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!

getting error on mysql database

Discussion in 'Database Discussion' started by mywish1, Sep 13, 2014.

  1. mywish1

    mywish1 Active Member

    Joined:
    Sep 13, 2014
    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    hi guys
    i have deicated server and cpanel install on there so now i m getting error like this
    Unable to connect to database [Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)] getting this error
    how i fix this please help me i need urgent help thanks
     
  2. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    143
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    Hello,

    This means that your MySQL service is not running. Try to start it via SSH :

    # service mysql start

    - Check if you are getting some errors when trying to restart or if the restart goes successful.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mywish1

    mywish1 Active Member

    Joined:
    Sep 13, 2014
    Messages:
    28
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    i did but same issue i have no idea how to fix plz help me

    - - - Updated - - -

    when i run service mysql start
    i m getting this error
    starting mysql error manager of pid-file quit whiteout updating file
    so what is issue ?
     
  4. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    What is in the MySQL error log
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    143
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Kochi, India, India
    cPanel Access Level:
    Root Administrator
    check this log file when you try to start mysql !

    # tail -20 /var/lib/mysql/$hostname.err

    ^ replace $hostname with your server hostname
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    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, you can run this command and restart MySQL:

    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...
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