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 jasonman, Jul 2, 2014.

  1. jasonman

    jasonman Active Member

    Joined:
    Jul 2, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello, when I change the password in SSH, there is a error showing in cpanel database as following:

    Code:
    Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 ...caught
    In SSH connecting SUCCESS:

    Code:
    root@tradeppt [/var/lib/mysql]# service mysql status
     SUCCESS! MySQL running (25374)
    root@tradeppt [/var/lib/mysql]# mysql
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 188
    Server version: 5.5.37-cll MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> exit
    Bye
    root@tradeppt [/var/lib/mysql]# service mysql status
     SUCCESS! MySQL running (25374)
    root@tradeppt [/var/lib/mysql]# service mysql start
    Starting MySQL SUCCESS!
    
    plase help
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Please check to see if /var/lib/mysql/mysql.sock is symbolically linked to /tmp/mysql.sock. If not, run this command:

    Code:
    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jasonman

    jasonman Active Member

    Joined:
    Jul 2, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi Michael,
    I follow your command and resolve the issue, thank very much!
    You are very helpful.

    Thanks you!
     
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