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.

Problems with mysql

Discussion in 'Database Discussions' started by ameritek, Dec 5, 2005.

  1. ameritek

    ameritek Registered

    Joined:
    Oct 25, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    We have a problem with Daemon of mysql, this deamon run before to install cpanel, in this moment no run and dont want run...

    We try restart this deamon in mode root but not is possible.

    How can i do...? :(

    the error is:

    /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").
     
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    This problem has been discussed so many times. Search the forums using the following terms: no valid mysql.sock file found.mysql has failed. In addition, try this command at the prompt and see if it fixes the problem:

    /scripts/mysqlup --force
     
  3. b0072k1

    b0072k1 Well-Known Member

    Joined:
    Dec 30, 2004
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Glasgow
    i tried that still said its missin
     
  4. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    Try resetting the root mysql password form WHM
     
  5. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Well you should have searched this forms, I had this problem and I found the awesome solution posted that worked...

    Fatal error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

    Code:
    # /etc/init.d/mysql stop
    # ps -ef | grep mysql | grep -v grep | awk '{print "kill -9", $2}' | sh
    # touch /var/lib/mysql/mysql.sock
    (!$ is last variable on previous line in bash -  /var/lib/mysql/mysql.sock)
    # chown mysql:mysql !$
    # /etc/init.d/mysql start
    (make sure its running)
    # ps -ef | grep mysql
    # mysql -uroot -p`cat /root/.my.cnf | grep pass | sed s/"pass\=\""// | sed s/\"//
    Well I dont remember who posted it though... :D
     
  6. Sir

    Sir Registered

    Joined:
    May 12, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    hello!
    i try this commands but nothing!

    MySQL is running but:

    Unable to establish connection to MySQL
    2002 : Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

    and in phpmyadmin: access denied (only reseller)

    in Cpanel Root i have access to phpmyadmin.
     
  7. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Did you upgrade and/or downgrade MySQL? Did you check on the syntax in /etc/my.cnf? If none of these worked for you, you'll have to hire a sys admin.
     
  8. Sir

    Sir Registered

    Joined:
    May 12, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    i update MySQL to 5
    this is my "my.cnf"


    [mysqld]
    set-variable = max_connections=500
    safe-show-database
    old-passwords = 1
     
  9. joshuaeric

    joshuaeric Registered

    Joined:
    Jun 23, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Andy, worked great.

    I still had errors in WHM, which were fixed by this thread: http://forums.cpanel.net/showthread...+valid+mysql.sock+file+found.mysql+has+failed

    Just for the record, and if anyone else stumbles across this issue...

    I started getting this error after doing post install updates on a new server with scripts inside of the /scripts/ folder.

    /scripts/upcp

    etc.
     
    #9 joshuaeric, Jul 9, 2006
    Last edited: Jul 9, 2006
Loading...

Share This Page