A root permission error occurs when the MySQL GRANT command is executed. When the MySQL node executes the GRANT command to authorize the SPIDER server, the following error occurs:
Reference mysql> grant all on *. * TO 'spider '@ 'spiderdb' identified by 'spider'; ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: YES) www.2cto.com, But I log on as a root user. The root password is empty. How can this error be reported. If the same error occurs on the Internet, it is a solution to logon without MySQL. If you forget the password, you can use the following method: Reference #/etc/init. d/mysql stop # mysqld_safe-u mysql -- skip-grant-tables -- skip-networking & # mysql-u mysql> UPDATE user SET Password = PASSWORD ('newpassword ') where USER = 'root'; mysql> flush privileges; mysql> exit www.2cto.com #/etc/init. d/mysqld restart # mysql-uroot-pnewpassword www.2cto.com, but this method cannot solve my problem. There is another way to delete the user online. if the value of user is NULL (delete from user where user is NULL), or update NULL to test (update user set user = 'test' where user is NULL ). But it is not easy to use. Occasionally, it is no problem to authorize a single database. Is it because root does not have the permission for a specific database? A script is written to execute "grant all on $ database. * TO 'root' @ 'localhost' identified by 'cps-pt' with grant option; ", an error occurred when information_schema was used. When Comrade dump/restore was executed two days ago, DB had been killed, and information_schema was damaged. This seems to be a bug in MySQL restore. Author: Qin Chao Gu Yue