How to change mySQL user password and root password on cPanel
How to change/reset mySQL database user password on a cPanel Server
Do the below steps if you have forgotten the mySQL database user password. Always set a strong password for the mySQL database because weak passwords can be easily cracked by hackers.
You must have access to cPanel control panel to change the password of the mySQL database user.
1. Open a new web browser (like google chrome) and type the below url to access cPanel of your wbesite
https://Domain.com:2083
OR
https://Domain.com/cpanel
Domain.com should be replaced with the actual domain name.
2. Enter cPanel username and password to login
Enter cPanel login details in the username and password field. Contact your webhosting company if you have lost the cPanel login details.
3. Search for “Databases” in cPanel Search bar and click on “MySQL Databases” under “Databases”
4. In the next page scroll down to the bottom. Under “Current Users” you can see the list of mySQL users created in this cPanel account.
Under “Actions” you can see “Change Password” for all mySQL users
Click on “Change Password” next to corresponding database.
5. In the next page you can see the option to enter a new mySQL Password
6. Enter new mySQL user password and click on “Change Password”
You can use “Password Generator” to generate a strong mySQL password. You must set strong mySQL user password because it is easy to crack a weak mySQL password. You might see warning if the mySQL password strength you have entered is below 65%.
You will see a success prompt after changing the mySQL user password.
How to change mySQL root Password on a cPanel server
The above steps are for changing the password of a database user on cPanel server. Do the below steps to change the mySQL root password of the server.
You must have server root access to change the mySQL password.
1. Log in to WHM using server root login details
link to access WHM : https://ServerIP:2087
Username : Enter ‘root’ username
Password : Enter root password
2. Search for “MySQL Root Password” in WHM search bar
3. Click on “MySQL Root Password” under “SQL Services”
Home » SQL Services » MySQL Root Password
4. Enter new mySQL root password twice and click on “Change Password”