Lost MySQL Root Password

It happens everynow and again, you login to a server to do something with MySQL only to find the root password is nowhere to to be found.

Never fear its not too hard to reset and you should be back up running again in a couple of minutes.

Step 1

First stop the database server with killall mysqld or /etc/init.d/mysqld stop

Step 2

Execute the command mysqld –skip-grant-tables –user=root to get the MySQL server running again minus the need for a password.

Step 3

Read More