Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Secret Agent
    Guest

    Default mysql bug or not?

    I get this intermittently every other day or so even after I correct mysql (confirmed for sure)

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



    MYSQL FIX
    Look in your /etc/my.cnf file and if there is a line like:
    socket=/var/tmp/mysql.sock
    remove it and restart MySQL

    or

    Command lines are as follows.

    root [/]# cd /var/lib/mysql
    root [/var/lib/mysql]# chmod 771 *

    Now all folders and files in the /var/lib/mysql folder are chmod 700
    We need to chmod mysql.sock as 777 so

    root [/var/lib/mysql]# chmod 777 mysql.sock

    you need to chmod your <hostname>.pid file as 660
    to get your hostname:
    root [/var/lib/mysql]# hostname

    then :
    root [/var/lib/mysql]# chmod 660 <hostname>.pid



    This always fixes any mysql issues I've had, but this time around it keeps coming back odd enough. Is anyone having the same problem?

    I'm using MySQL 4.1.8standard
    Cpanel 10.x C34

  2. #2
    Member
    Join Date
    Sep 2003
    Posts
    658

    Default

    I have two servers that have it...a second restart attempt always pulls it back up though.

  3. #3
    Secret Agent
    Guest

    Default

    Anyone know of a fix at least?

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    When this occurs, have you checked that /var/tmp/mysql.sock exists?

    Perhaps /var/tmp, being something of a temporary directory, is being cleared out by some automated script from time to time.

  5. #5
    Secret Agent
    Guest

    Default

    I always get the error below

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


    It happens out of nowhere and I have to go through the whole process of chmodding everyhing back to normal, restarting mysql again.

    I do not know what is causing it

Similar Threads & Tags
Similar threads

  1. MySQL API1 Bug After 11.28? mysql::adduser
    By Volomike in forum cPanel Developers
    Replies: 4
    Last Post: 11-15-2010, 08:23 AM
  2. MySQL 5.1.51 bug
    By JoeDavola in forum Database Discussions
    Replies: 1
    Last Post: 11-05-2010, 08:53 AM
  3. MySQL 5.1.51 bug
    By JoeDavola in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-04-2010, 06:06 PM
  4. MySQL BUG???
    By c0i0t3 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-02-2006, 08:22 AM
  5. MySQL Bug...
    By Woofcat in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-27-2003, 12:05 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube