Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

The MySQL server is currently offline

Discussion in 'Database Discussion' started by SAVVAS KONSTANTINOU, Jul 25, 2015.

  1. SAVVAS KONSTANTINOU

    SAVVAS KONSTANTINOU Registered

    Joined:
    Jul 25, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bahrain
    cPanel Access Level:
    Website Owner
    Hello,

    I am facing a problem with my virtual server. After c-panel updated I have a database connection error.

    "The MySQL server is currently offline.

    Error while connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Error while connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 165."


    I talked with support but I didn't get any solution

    Below is a part of the discussion from support:

    -root@ip-166-62-46-102 [~]# service mysql start
    Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/ip-166-62-46-102.secureserver.net.pid).


    -root@ip-166-62-46-102 [~]# service mysql start
    Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/ip-166-62-46-102.secureserver.net.pid).

    -Looks to be a pretty severe issue with a database on the server.
    and the PID document if you VIM to it is blank so that doesnt look right at all


    Does anyone know how to solve this problem? and explain step by step what I have to do?

    I am new in these things so I don't know a lot.

    Thank you
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you please check your mysql error logs file and let us know what error are you getting in that file. You can check this with the following command.

    Code:
    /var/lib/mysql/ip-166-62-46-102.secureserver.net.pid
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. velnix

    velnix Member

    Joined:
    Aug 9, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It should be
    Code:
    tail /var/lib/mysql/`hostname`.err
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. TerranceR

    TerranceR Well-Known Member

    Joined:
    Jul 9, 2015
    Messages:
    74
    Likes Received:
    10
    Trophy Points:
    83
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You said that you talked with support and didn't get a solution, what is the ticket number? I assume you didn't get a solution since it was likely related to InnoDB corruption?
     
  5. SAVVAS KONSTANTINOU

    SAVVAS KONSTANTINOU Registered

    Joined:
    Jul 25, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bahrain
    cPanel Access Level:
    Website Owner
    Hello and thank you for replies.

    I get this when I am checking:

    -bash: /var/lib/mysql/ip-166-62-46-102.secureserver.net.pid: No such file or directory


    Also I talked with my server provider support not with c-panel support and I don't know the ticket number.
     
  6. TerranceR

    TerranceR Well-Known Member

    Joined:
    Jul 9, 2015
    Messages:
    74
    Likes Received:
    10
    Trophy Points:
    83
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hello,

    You will need to check /var/lib/mysql/ip-166-62-46-102.secureserver.net.err not /var/lib/mysql/ip-166-62-46-102.secureserver.net.pid
     
  7. TerranceR

    TerranceR Well-Known Member

    Joined:
    Jul 9, 2015
    Messages:
    74
    Likes Received:
    10
    Trophy Points:
    83
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I would recommend submitting a ticket to http://tickets.cpanel.net for help regarding issues like this.
     
  8. SAVVAS KONSTANTINOU

    SAVVAS KONSTANTINOU Registered

    Joined:
    Jul 25, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bahrain
    cPanel Access Level:
    Website Owner
    Hello,

    I get this:

    -bash: /var/lib/mysql/ip-166-62-46-102.secureserver.net.err: Permission denied

    Thank you
     
  9. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, I apologies for my last update. Correct mysql error logs file name is /var/lib/mysql/ip-166-62-46-102.secureserver.net.err and you can check live mysql logs with the following command.

    Code:
    tail -f /var/lib/mysql/ip-166-62-46-102.secureserver.net.err
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. SAVVAS KONSTANTINOU

    SAVVAS KONSTANTINOU Registered

    Joined:
    Jul 25, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bahrain
    cPanel Access Level:
    Website Owner
    #10 SAVVAS KONSTANTINOU, Jul 26, 2015
    Last edited by a moderator: Jul 26, 2015
  11. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice