Problems to change root mysql password

m0rpheu5

Well-Known Member
Jun 16, 2005
75
0
156
Brazil, Curitiba/PR
cPanel Access Level
Root Administrator
Hello guys, i´m getting problems with my mysql, i have some sites that many times per day got this error:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

ok, so i start to looking for this issue, and i execute this script "/scripts/mysqlconnectioncheck" and after that my problems grow up, the last line of this script i got this message "The MySQL root password has been changed." after that i can´t access my phpmyadmin and the root password not work anymore, i already many ways to change the root password, all without success.

I tried use the "mysqll root password" in the WHM/ SQL Services, say that the root password was change, but not work too, i try this too that i found in the cpanel forum:

/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql mysql -e "update user set password=PASSWORD('mynewpassword') where user='root';"
killall -9 mysqld_safe
killall -9 mysqld
/etc/init.d/mysql start

Not work too, does anybody knows how can i change this root password?

Thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello m0rpheu5,

Could you open up a technical support ticket at this point in WHM > Support Center > Contact cPanel or using the link in my signature? Since the normal methods to reset the password aren't working, we'd need physical access to the machine to troubleshoot what is happening.

Please let us know the ticket number here upon opening one.

Thanks!
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
Hi m0rpheu5,

Just curious to know whether you are able to login , if you explicitly specify the user name and password ( that is like mysql -u root -pPASSWORD ).

Thank you,
Nibin.
 

m0rpheu5

Well-Known Member
Jun 16, 2005
75
0
156
Brazil, Curitiba/PR
cPanel Access Level
Root Administrator
No i can´t log into the mysql, got access denied for user [email protected], i open a ticket with cpanel team and they already fix the issued and informed me that they don´t know why but the user root disappear from mysql.user table, they needed to recreate the user, then they could access the mysql as root.

Thanks