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.

MYSQLD went down

Discussion in 'General Discussion' started by romanus, Dec 16, 2005.

  1. romanus

    romanus Well-Known Member

    Joined:
    Jul 17, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    result was "Warning, no valid mysql.sock file found.mysql has failed").

    Anybody can help me please?
     
  2. aress

    aress Active Member

    Joined:
    May 5, 2004
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Try this first:

    service mysql stop
    rm -f /var/lib/mysql/mysql.sock
    service mysql start
    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

    if fails :
    The the final solution is :

    I read a post at the RackShack forum that the following needed to be in the /etc/my.cnf file:

    [mysqld]
    set-variable = max_connections=500

    [client]
    port = 3306
    socket = /tmp/mysql.sock
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock


    I only had the first 2 lines, so I added the [client] and [mysqld] parts.


    Then I shut down mysql and chkservd with the following commands:

    service mysql stop
    /etc/rc.d/init.d/chkservd stop


    Then I removed the following files:

    rm -rf /tmp/mysql.sock
    rm -rf /var/lib/mysql/mysql.sock


    Now restart mysql and chkservd with the following commands and mysql will create the mysql.sock file in the /tmp directory as oulined in the updated my.cnf file:

    service mysql start
    /etc/rc.d/init.d/chkservd start


    Now create the softlink with this:

    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock


    There were a couple of variations in that last last command to create the softlink. I guess it depends on where mysql creates the mysql.sock file when it starts. So if you are trouble shooting you might shut down mysql as shown above, then remove the mysql.sock files. Then restart mysql as shown above and see where it creates the mysql.sock file. If it creates it in the /tmp directory then you need the softlink command shown above. If it creates the mysql.sock file in the /var/lib/mysql directory then you problaby need to use the softlink command like this as shown in some of the other related posts:

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock


    If you want to make sure which should be the valid symlink among the two below used widely.

    1. /tmp/mysql.sock

    2. /var/tmp/mysql.sock

    For the valid link used on the server among the above two, check the /etc/my.cnf file for follwoing line.

    " socket=/var/tmp/mysql.sock "

    You need to create the symlink for the socket mentioned in above line.


    Try all the above. if it doesn't work then do this :
    ln -s /var/lib/mysql/server.servername.com.pid /var/run/mysqld/mysqld.pid
    service mysqld start

    n my case it not solved by all solutions given coz I was update cpanel and
    the start up script is not working so it can't startup, so need to copy from another server
    :D
     
  3. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    This step is totally wrong :(
    The /tmp/mysql.sock is the soft link of /var/lib/mysql/mysql.sock .

    Try the following scripts
    /scripts/mysqlup
     
  4. romanus

    romanus Well-Known Member

    Joined:
    Jul 17, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for your reply unfortunately this didn't work for me. There is no mysql.sock file in any location
     
  5. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Try the scripts

    /scripts/mysqlup --force
     
  6. romanus

    romanus Well-Known Member

    Joined:
    Jul 17, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    That is what I did first. When that didn't work I tried adding the lines the gentleman above recommended to my.cnf.

    That didn't seem to do it, then I changed the permissions on my /tmp directory to 777 and that seemed to allow mysql to come back up

    Seems a little risky to me but maybe thats the way it is supposed to be.

    eximstats still hasn't come back though. It looks like I may have had a slight hardware failure
    which may have caused this
     
  7. romanus

    romanus Well-Known Member

    Joined:
    Jul 17, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    funny I was on your site earlier about to pull the panic trigger. Heart is still thumping rather hard in my chest.
     
  8. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Better change the permission of /tmp should be 1777

    Also if mysql is up try

    /scripts/restartsrv_eximstats
     
  9. romanus

    romanus Well-Known Member

    Joined:
    Jul 17, 2004
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Thanks you all for your help, Everything is back up and running
     
Loading...

Share This Page