How to Reset a MySQL Password:
- Stop the mysqld daemon process,
- Start the mysqld daemon process with the –skip-grant-tables option,
- Start the mysql client with the -u root option,
- Change password to no password at all. Execute the UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;
- Execute the FLUSH PRIVILEGES; command.
[root@host ~]# /etc/init.d/mysqld stop
Stopping MySQL: [ OK ]
[root@host ~]# /etc/init.d/mysqld start --skip-grant-tables
Starting MySQL: [ OK ]
[root@host ~]# mysql -u root -p
Enter password:
<— enter current root password
mysql> UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
mysql> FLUSH PRIVILEGES;
Found somewhere on the internet and helps me a lot.