Resolve ERROR 1045 (28000): Access denied for user

To solve this issue, login via ssh and:

service mysqld stop

mysqld_safe –skip-grant-tables &
mysql -u root

mysql>
mysql> use mysql;
mysql> UPDATE user SET Password = PASSWORD (‘yournewpassword’) WHERE User=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit;

service mysqld start

Leave a comment