After mysql is installed, an error is reported during logon, although a password is set during installation. ERROR1045 (28000): Accessdeniedforuserroot @ localhost (usingpassword: YES) solution: # mysql-urootmysqlmysqlUPDATEuserSETPasswordPASSWORD (newpassword) whereUSERroot; m
After mysql is installed, an error is reported during logon, although a password is set during installation. ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: YES) solution: # mysql-u root mysql UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root'; m
After mysql is installed, an error is reported during logon, although a password is set during installation.
ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: YES)
Solution:
# Mysql-u root mysql
Mysql> UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root ';
Mysql> flush privileges;
Mysql> quit
#/Etc/init. d/mysqld restart
After modifying the command line again, restart the mysql service.