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!

mysql 5 on new server, can't connect

Discussion in 'General Discussion' started by Jakeman, Aug 21, 2007.

  1. Jakeman

    Jakeman Registered

    Joined:
    May 2, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    phpmyadmin (from cpanel or whm) generates this error:

    "#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)"

    The only changes I made to MySQL was when I selected the MySQL5 option in WHM -> Tweak Settings, after which I rebuilt Apache.

    Any ideas?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Did you run /scripts/mysqlup or upgrade MySQL by going to WHM -> Software -> Update Server Software as described in the on-screen instructions accompanying the Tweak Settings option?
     
  3. Jakeman

    Jakeman Registered

    Joined:
    May 2, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    I ran WHM -> Software -> Update Server Software.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Followed by recompiling Apache I assume.

    In that case, I recommend submitting a support ticket so our support staff can resolve the issue you are experiencing.
     
  5. Jakeman

    Jakeman Registered

    Joined:
    May 2, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Ya, I ran:

    WHM -> Software -> Apache Update

    ...after that.

    If the trouble ticket with my host doesn't yield a solution then I will open a ticket with you guys.
     
  6. Jakeman

    Jakeman Registered

    Joined:
    May 2, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    FYI, my host fixed it:

    I don't know what they changed in that file, but it works now.
     
  7. thehostrack

    thehostrack Member

    Joined:
    Aug 11, 2003
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Update:

    Here this will save you countless hours:

    Step 1.)

    Rem out the line in /etc/my.conf that was setting basedir to /var/lib. As seen below:

    user=mysql
    #basedir=/var/lib

    Step 2.)

    Create the directory "/var/run/mysqld" if it does not exist. Then chown that directory to mysql.mysql as below...

    mkdir /var/run/mysqld
    chown mysql.mysql /var/run/mysqld

    Step 3.)

    Start the service..

    service mysql start
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 thehostrack, Aug 30, 2007
    Last edited: Aug 30, 2007
  8. sankvas

    sankvas Member

    Joined:
    Nov 29, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    151
    Kindly check if a socket file exists on /tmp.

    if not add one
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    root@server [~]# mysqladmin var | grep socket
    | socket | /var/lib/mysql/mysql.sock |
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    root@server [~]# cd /tmp
    root@server [/tmp]# ln -s /var/lib/mysql/mysql.sock .

    This fixed the issue for me.
     
    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