When cPanel/WHM is set up, your system MySQL password is randomly generated. If you ever need it, you can change it to something you’ll know.
1) Go to SQL Services in the menu.
2) Click MySQL Root Password.
Since this password can be used to gain access to every database on your system, you should set this to something that is very hard to guess. Preferably, use the password generator.
3) Enter and confirm the new password, or generate one.
4) Let’s change the password length to 24.
5) Then, click Regenerate.
6) And then Use Password.
7) Take note of the password and store it in a safe place.
8) Click Close.
9) Finally, click Change Password.
The root MySQL password should have been changed successfully.
10) If you received an error message, there is an alternative way to change the password. Click Reset Local MySQL Root Password.
11) Please take note of the warning. This tool should only be used as a last resort, if the other one won’t work.
Per the WHM documentation: This feature will result in a brief security risk to your server and an interruption of MySQL service; it should only be used as a last resort during times of low traffic, when you encounter a file permissions error using the MySQL Root Password feature.
Use this page in exactly the same way as the standard root password tool.
This is the end of the tutorial. You now know how to change the root MySQL password in WHM, and how to reset it if necessary.