Resolve ERROR 1045 (28000): Access denied for user

Premium services since 2010

Trusted by thousands of businesses worldwide • 99.9% Uptime Guarantee • Crypto Accepted

Table of Contents

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