The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems to change root mysql password

Discussion in 'General Discussion' started by m0rpheu5, Aug 4, 2011.

  1. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    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
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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!
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    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.
     
  4. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    No i can´t log into the mysql, got access denied for user root@localhost, 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
     
Loading...

Share This Page