Reset MySQL root password WITHOUT existing root password

Sometimes, you may need to reset MySQL root password without existing root password on your web hosting server. You can reset the password by following the below steps:

WHMCS Complete Billing and Support

[1] Stop the MySQL service from the server.

[2] Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.

[3] Connect to mysql server as the root user. You can connect with GUI tool or from SSH or command line.

[4] Update MySQL root password using the following query:

Flush the privileges using the following query:

[5] Exit and restart the MySQL service.

For Linux servers, following are the complete steps with commands:

[1] Stop MySQL service:

[2] Start MySQL with –skip-grant-tables:

[3] Connect to MySQL server:

[4] Set new MySQL root user password:

[5] Stop and start MySQL service:

That’s it. Now, you should be able to access MySQL server using the root password specified in steps 4.

Posted in Web Hosting and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *