How do I change the cPanel root MySQL password?

Recommended Web Hosting Provider

At WebHostingToolBox we’re all about the right choices. This is why we’ve dedicated ourselves to ensuring that we only recommend the best possible web hosting provider. As such, from all the facts, figures, and analysis we’ve done. We strongly endorse InMotion Hosting as an affordable, reliable and customer focused web hosting provider you nothing but reliable service with superior support.

Visit WebsiteMore Info
194 Reviews
100.00% Uptime

While we strongly recommend that you don't change the root cPanel MySQL password, there are certain circumstances in which this might be necessary. Please find below a step-by-step guide on how to accomplish this:

  • Login to the SSH (Secure Shell) of your cPanel VPS Server
  • Run the following command # cat /root/.my.cnf
  • It should show you something that looks like this:

Password: ************

  • Finally, you will need to be able to adjust the password, by doing the following:

mysql --user=root mysql
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;

That's it; you've successfully updated the cPanel MySQL root password for your cPanel Virtual Private Server. If you find that you have any issues with this, please feel free to contact with your cPanel web hosting support department for further assistance.