Stop mysql service
service mysql stop
Set database permissions so that everyone can log in, that is, skip verification (with If you are interested, you can take a look at the skip -grant command, which I have little knowledge of)
mysqld –skip-grant-tables
After the command is executed, we are equivalent to logging in without verification. Then we set up verification and add users.
mysqld –skip-grant-tables –user=root(root为你想设置的用户名,–别错了)
Then open a remote link, and the current terminal does not need to be closed. At this time, we can log in directly without a password.
mysql -u root -p
After logging in, we can use the mysql command to set the username and password we want.
The above is the detailed content of phpmyadmin cannot log in. For more information, please follow other related articles on the PHP Chinese website!