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 problem

Discussion in 'General Discussion' started by wavewind, Aug 18, 2007.

  1. wavewind

    wavewind Registered

    Joined:
    Aug 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I've the WHM 11.2.0

    The mysql is not running, when I restart the mysql service, it came up with this:

    Waiting for mysql to restart.... . . . . . . . . . . finished.

    mysql status

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

    I thought maybe I should upgrade mysql but it seems the version is up to date.

    MySQL Setup Script Version 7.0
    Loaded cPPkgs::MySQL ok!
    This is the cPPkgs::MySQL 4.1.22 installer for Linux.
    MySQL 4.1.22 is up to date

    Any help is very appreciated!

    Thanks,
    Stephen
     
  2. kirkke

    kirkke Registered

    Joined:
    Aug 18, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
  3. magoori

    magoori Registered

    Joined:
    Aug 7, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have same problem today :(
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    So did you see if your socket exists in tmp? Even if you don't know, just run through these commands


    cd /var/lib/mysql
    touch mysql.sock
    chown mysql:mysql mysql.sock
    chmod 1777 mysql.sock
    ln -s /var/lib/mysql/mysql.sock /tmp
    chmod 1777 /tmp
    /scripts/mysqlup --force
    /etc/rc.d/init.d/mysql restart
     
  5. wavewind

    wavewind Registered

    Joined:
    Aug 1, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Jayh38, Thank you so much! It works!
     
  6. webstyler

    webstyler Well-Known Member

    Joined:
    Nov 20, 2003
    Messages:
    432
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Mysql crash.. work within any minute ago, I have changed only a value on my.cnf .. and the try restart.. but crash.

    If try to stop or restart nothing happen :(

    I have try code posted but not work.. he freeze at
    Preparing ....

    :(

    all db is down :'(

    any help ?
     
  7. kipper3d

    kipper3d Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    I have similar issue however it affects only 1 site.

    Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/xxxxx/public_html/inc/class_db.php on line 12
    Error Connecting to MySQL database

    I am running mysql 5.0.67

    Could it be mysql compatibility issue of the website? We recently migrated that site from a server with mysql 4 to current mysql5


    Other info:
    socks exists in /tmp/mysql.socks
    my.cnf has nothing in it but
    [mysqld]
    skip-bdb

    Thanks!

    -John
     
    #7 kipper3d, Dec 10, 2008
    Last edited: Dec 10, 2008
Loading...

Share This Page