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.

getting error on mysql database

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

  1. mywish1

    mywish1 Member

    Joined:
    Sep 13, 2014
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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:
    145
    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.
     
  3. mywish1

    mywish1 Member

    Joined:
    Sep 13, 2014
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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:
    91
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    What is in the MySQL error log
     
  5. triantech

    triantech Well-Known Member

    Joined:
    Jul 1, 2014
    Messages:
    145
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    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, you can run this command and restart MySQL:

    Code:
    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
    Thank you.
     
Loading...

Share This Page