http://361324767.blog.163.com/blog/static/11490252520124454042468/
First of all, I want to say a word:
I greatly despise the domestic people engaged in it, simply no language, the same is to solve the problem, almost identical, are copied. What's more, the error thrown is: Access denied for user ' root ' @ ' localhost ' to database ' MySQL ', unexpectedly also the other people's solution copied over, but also shameless said: The problem solved, I guess not really to operate.
Here are the solutions I get based on the reference to others:
The problem arises:
After I have finished loading MySQL on CentOS, I throw mysql-sql error (1130) When I use Navicat link: Host IP is isn't allowed to connect to this MySQL server error, specifically resolved Method please refer to my log http://361324767.blog.163.com/blog/static/114902525201232832621498/.
After the problem is resolved, I log in to MySQL, mysql-u root without error, but when executing the following statement:
mysql> use MySQL
To throw the error, refer to the online big copy of the masterpiece as follows:
--------------------------------------------------------------------------------------------------------------- -------------------------------
If you enter MySQL first, enter use MySQL after successful startup, the following error occurred: Access denied for user "@ ' localhost ' to database ' MySQL ' and, lost 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 the update user Set password = password (' 123456 ') where user = "root" specific steps: Close MySQL: # service mysqld stop then: # Mysqld_safe--skip-gra Nt-tables start MySQL: # service mysqld start mysql-u root mysql> use MySQL mysql> UPDATE user SET Password=password (' x xx ') WHERE user= ' root '; mysql> flush Privileges; Mysql>\q |
--------------------------------------------------------------------------------------------------------------- ------------------------------------------
In accordance with the steps of the big copy of the step by step, without any effect, carefully study the error message in the user ' @ ' localhost ', stating that the user table user= ' information is incorrect, and then perform the update user SET Password=password (" ) WHERE user= ';
Decisiveness has no effect.
Finally, do not allow Anonymous logon, execute the following statement
mysql> Delete from user where user= ';
MySQL > Flush privileges;
Mysql> \q
# Service Mysqld Restart
Problem solving.
------------------------------
In this advice you engage it colleagues, you are a little professional spirit, okay? What do you mean, you know, every question, okay? Do you want to copy it? The face of Chinese it people, China's IT industry has been destroyed in your group of hands.
MySQL-fix access denied for user "@ ' localhost ' to database ' MySQL ' problem