ERROR 1044 (42000): Access denied for user "@ ' localhost ' to database ' MySQL '
Just installed on the server MySQL, found that the root plus password to always log in, and directly enter MySQL directly can login. or mysql–u root can be logged in, but the internship on the log on is also an empty user (' @ ' localhost '), not the root user, cannot see other databases.
dry, remove empty user method
1. Turn off MySQL
Service Mysqld Stop
Or
/etc/init.d/mysql stop
2. Blocking permissions
Mysqld_safe--skip-grant-table
Screen appears: Starting demo from .....
3. Start a new terminal input
Mysql-u Root MySQL
mysql> Delete from user where user='; MySQL> FLUSH privileges;mysql> \q
4. Close all terminals, restart or turn on MySQL.
dry, set a password for root
1. Turn off MySQL
Service Mysqld Stop
2. Blocking permissions
Mysqld_safe--skip-grant-table
Screen appears: Starting demo from .....
3. Start a new terminal input
Mysql-u Root MySQL
mysql> UPDATE user SET Password=password ('newpassword') where user='root '; MySQL> FLUSH privileges;mysql> \q
I'm the dividing line of the king of the land Tiger.
Mysql,error 1044 (42000): Access denied for user "@ ' localhost ' to database ' MySQL '