Reset MySQL root password

Add "skip-grant-tables" (without quotes) at the end of [mysqld]:
[mysqld]
skip-grant-tables
Restart DB engine. Go inside:
mysql -u'root'
Set new password:
UPDATE mysql.user SET Password=PASSWORD('new-password') WHERE User='root';
FLUSH PRIVILEGES;
exit;

No comments: