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.

SQL server is currently offline

Discussion in 'Database Discussions' started by hazemelsayed, May 30, 2014.

  1. hazemelsayed

    hazemelsayed Registered

    Joined:
    May 30, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I have problem of sometimes my website missing the connection to database, & when i go to MySQL Databases
    in Cpanal I found the following:

    SQL server is currently offline

    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, <STDIN> line 1.

    kindly help me???!!
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you please let us know what exact error are you getting in MySQL error logs file. Try to check MySQL error logs file through command line
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Check to verify that MySQL is running and able to restart successfully:

    Code:
    service mysql restart
    Also, look for any error messages in /var/lib/mysql/$hostname.err and let us know if you see any errors in the event MySQL fails to start.

    Thank you.
     
  4. sladone

    sladone Registered

    Joined:
    Oct 29, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Where I have to insert this code? I have the same problem and I need Help.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you elaborate on the specific problem you are having? Note that your access level is listed as "Website Owner" so you will need to contact your web hosting provider if MySQL is not responding.

    Thank you.
     
Loading...

Share This Page