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!
  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 Aristocrat, Jan 9, 2018.

  1. Aristocrat

    Aristocrat Registered

    Joined:
    Jan 8, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Chennai
    cPanel Access Level:
    Website Owner
    Error while connecting to MySQL: (XID zgjvsh) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) Error while connecting to MySQL: (XID zgjvsh) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) at /usr/local/cpanel/Cpanel/Mysql.pm line 167, <STDIN> line 1.
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    41
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    If your file my.cnf (usually in the /etc/mysql/ folder) is correctly configured with

    socket=/var/lib/mysql/mysql.sock
    you can check if mysql is running with the following command:

    mysqladmin -u root -p status
    try changing your permission to mysql folder. If you are working locally, you can try:

    sudo chmod -R 755 /var/lib/mysql/
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Aristocrat,

    Your access level shows as "Website Owner". I recommend reporting this issue to your web hosting provider so they can take a closer look to see why MySQL is not responding.

    Thank you.
     
Loading...

Share This Page