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 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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  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