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.

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:
    1
    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,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    1
    I ran WHM -> Software -> Update Server Software.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    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:
    1
    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:
    1
    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:
    1
    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
     
    #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:
    1
    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.
     
Loading...

Share This Page