Open phpMyAdmin, log in, the following problems occur, prompted: #1045 unable to log on to the MySQL server
The following error condition may occur: phpMyAdmin: #1045 cannot log on to the MySQL server. Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Cause: This may be due to the previous setting of the MySQL password is not successful, so we use the set MySQL root password can not log on to the server.
Workaround: You can then attempt to log into the database using the empty password of the MySQL default root account.
If you log in with a blank password, it appears: empty password login is forbidden (see allow null password) error. To modify the/phpmyadmin/libraries/config.default.php file, locate the following two lines
$cfg [' Servers '] [$i] [' nopassword '] = false;
$cfg [' Servers '] [$i] [' allownopassword '] = false;
Change two false to True and set $cfg [' Servers '] [$i] [' password '] = "; After you set up the configuration file, phpMyAdmin allows you to log in to the MySQL database with a blank password.
If you re-login to phpmyadmin with a blank password, you may still not be able to log in, please clear the cookie or close the original phpMyAdmin login window and re-login with a blank password.
If this time still shows the blank password login is forbidden, try to enter a few characters as a password to see if the landing is successful.
Log in to MySQL server and change the MySQL password in phpMyAdmin as soon as possible. or modify the MySQL password on the SSH client: cd/usr/local/mysql/bin
Then execute the command:./mysqladmin-u root-p passwordhttp://laser-mall.com/passwd.
Finally, all users except root are removed from the MySQL user table.
Login phpMyAdmin prompt: #1045 Unable to log on to MySQL server