It happens, you set a super complicated password for your MySQL root account and 2 months down the road forget what it was.

Here’s how you’d fix that.

  1. Stop your current MySQL database if it is running

root@abubu# service mysqld stop

  1. Start MySQL in safe mode and bypass reading the privilege table.

root@abubu# mysqld_safe --skip-grant-tables

  1. Reset your root password MySQL console. If it goes well you will not need to key in a password.

root@abubu# mysql -u root mysql

mysql> update user set Password=PASSWORD('new-password');<br /> mysql> flush privileges;<br /> mysql exit;

  1. Kill the MySQL process and restart MySQL normally.