Skip to main content

Error establishing database connection issues

Comments

7 comments

  • Don McDonald
    Okay, I am able to log back into my WHM and Cpanel accounts. perhaps they were just down...??? Still the big question and need help to resolve the issue of the error message "The MySQL server is currently offline." followed by the message below. "Error while connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2). Error from MySQL query: Can't call method "do" on an undefined value at /usr/local/cpanel/Cpanel/Mysql.pm line 1196, line 1." Please help
    0
  • cPanelMichael
    Hello :) Your access level is configured as "Reseller Owner". Do you have root access to this server? If not, please report this issue to your web hosting provider so they can take a closer look. Thank you.
    0
  • Don McDonald
    Yes, I have root access, I am the provider/owner/designer/ you name it, it's all me. :) Set up through Hostgator, a WHM account etc
    0
  • cPanelMichael
    Check to see if the /tmp/mysql.sock symbolic link exists and look for any error messages in /var/lib/mysql/$hostname.err when restarting MySQL. Thank you.
    0
  • Don McDonald
    Okay, I am not real experienced here, how do I do that search etc... [COLOR="silver">- - - Updated - - - I assuming I had to have been hacked here. While I was researching, my log in did not work for about 15 minutes. Then it allowed me in. The databases are completely gone. It's as though the Cpanel is new and starting from scratch. No files of any sorts. If this is the case, I did not back up my database, I assume it's gone for good? If so, I will need to rebuild the site and start over. Can this be done from the same Cpanel? When I go to see Wordpress installations it gives me a error...
    0
  • Don McDonald
    Okay, I am completely losing it.... Everything is all back up. 4 hours later. WTF??? What happened?
    0
  • whr
    Did you check the error log /var/lib/mysql/$hostname.err as Micheal suggested? If it happens again, see if MySQL has crashed. Try to start it using the below command: /etc/init.d/mysql start ; tail -f /var/lib/mysql/$hostname.err
    0

Please sign in to leave a comment.