Long time no use of MySQL, last because of the BANQ forum system, in the MySQL administrator in the time unexpectedly prompted MySQL error number 1045 Access denied for user ' admin ' @ ' LocalHost ' (using Password:yes) error, it seems that the password is right, the user name is wrong, and finally found himself to have made a mistake, the user name should be root, alas!
At the same time find someone else's information, together sent up, for the next use.
Access denied for user "@ ' localhost ' to database
I installed MySQL 5.0 in Yast2 with my own CD under SuSE Linux 10.2, and after installing MySQL in the terminal, MySQL
Successfully started, exited, and then entered mysqladmin-u root password XXXXX, error: Mysqladmin:connect to server at ' localhost ' failed
Error: ' Access denied for user ' root ' @ ' localhost ' (using Password:no) '
If you enter MySQL first and enter use MySQL after successful startup, the following error occurs: Access denied for user "@ ' localhost ' to database ' MySQL '
Also, to lose MySQL can, lose mysql-u root error:
Access denied for user ' root ' @ ' localhost ' (using password:no).
The reason is:
An error occurred while updating the root password yesterday
Update user Set password = ' 123456 ' where user = ' root '//This is wrong, the password is not actually 123456
Should be update user set password = password (' 123456 ') where user = "root"
Specific procedures:
Turn off MySQL:
# Service Mysqld Stop
And then:
# Mysqld_safe--skip-grant-tables
Start MySQL:
# service Mysqld Start
Mysql-u Root
mysql> use MySQL
mysql> UPDATE user SET password=password (' xxx ') WHERE user= ' root ';
mysql> flush Privileges;
Mysql>\q
That ' s it. I hope those above could do a little favor for you!
Error in SuSE access denied for user ' @ ' localhost ' to&