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.

The MySQL server is currently offline

Discussion in 'Database Discussions' 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,146
    Likes Received:
    34
    Trophy Points:
    48
    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
     
  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
     
  4. cPTerrance

    cPTerrance *nix Technical Analyst II / Migrations Specialist
    Staff Member

    Joined:
    Jul 9, 2015
    Messages:
    72
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Twitter:
    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. cPTerrance

    cPTerrance *nix Technical Analyst II / Migrations Specialist
    Staff Member

    Joined:
    Jul 9, 2015
    Messages:
    72
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Twitter:
    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. cPTerrance

    cPTerrance *nix Technical Analyst II / Migrations Specialist
    Staff Member

    Joined:
    Jul 9, 2015
    Messages:
    72
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Twitter:
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    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
     
  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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page