Reset MySQL root Password
We will reset mysql root password through command line in Linux server. Additionally, we are able to use this methodology in cPanel server, however there may be some downside WHM is not going to know the brand new root mysql password and database options will fail with entry denied from mysql. So in cPanel server, it would be best to reset the mysql root password by means of WHM.
Please refer the next hyperlink to learn how to reset MySQL root password in Linux server through command line. https://www.webhostingpeople.web/ideas/kb/how-to-recover-the-mysql-root-password/
On this tutorial will make it easier to to know learn how to reset MySQL root password through WHM.
1) Login to WHM as a root consumer.
2) From there choose “SQL Companies”.
3) Then click on on the button “MySQL Root Password”.
4) Now enter the brand new password and click on on “Change Password” button.
Restore Database Grants.
The cPanel offers “restoregrants” utility to revive the consumer’s database entry.
1) Login to the server as a root consumer through SSH.
2) Run both of the next instructions from command line.
/usr/native/cpanel/bin/restoregrants –cpuser=$cpuser –db=mysql, pg –dbuser=$dbuser
/usr/native/cpanel/bin/restoregrants –cpuser=$cpuser –db=mysql, pg –all
$cpuser is the cPanel username that has misplaced entry to databases.
mysql, pg is the kind of database: mysql for MySQL or pg for PostgreSQL
$dbuser >> The database consumer whose privileges you that want to restore. Should you use the –dbuser flag, the $dbuser variable will include the database consumer’s identify. Should you use the –all flag, the script will restore grants for the entire database customers that the cPanel account owns.
Should you want any additional assist please do attain our help division.