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 PID Locked

Discussion in 'General Discussion' started by easyhttp, Oct 26, 2004.

  1. easyhttp

    easyhttp Active Member

    Joined:
    Dec 25, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Middle East - Jordan
    Hi
    I have new installation
    I have changed my hostname
    then tried to restart MySQL and got this message


    mysql status

    Code:
    root      2667  0.0  0.0  3336   24 ?        S    Oct25   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
    mysql     2688  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2689  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2690  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2691  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2692  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2693  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2694  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2695  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2696  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    mysql     2697  0.0  1.5 31212 3388 ?        S    Oct25   0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid --skip-locking
    
    and got this error with all scripts that backended with MySQL

    Code:
    Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (

    What to do ?
     
  2. paolorulez

    paolorulez Guest

    #2 paolorulez, Oct 26, 2004
    Last edited by a moderator: Oct 26, 2004
  3. easyhttp

    easyhttp Active Member

    Joined:
    Dec 25, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Middle East - Jordan
    Hi
    thank you
    but this didnt solve it
    btw I have changed my hostname so its not localhost.localdomain anymore
    I have checked my.cnf and there is nothing about hostname

    I'm not sure why cpanel didnt apply hostname change to all backend software like mysql

    I have even update cpanel, and same error
     
  4. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    I have the same problem...

    I bet you had mysql[d] process running.
    Execute
    ps ax |grep mysql
    to see if you have any.

    If so, restart by:
    killall -TERM mysql;sleep 2;killall -9 -g mysql;killall -TERM mysqld;sleep 2;killall -9 -g mysqld;/scripts/restartsrv mysql

    It will kill old mysql from memory and allow new one to start.
     
  5. POLVIP

    POLVIP Member

    Joined:
    Feb 9, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Long Island, NY
    anyone got that fixed?
     
  6. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Possible mysql.sock fix

    I had a similar problem after updating cpanel.
    Went through this thread:

    http://forums.cpanel.net/showthread.php?t=14361

    But still had this mysql.sock error.

    Then I used the old "Reset Local MySQL Root Password" in WHM
    which fixed my problem. I hope this might help someone.
     
  7. Myacen

    Myacen Well-Known Member

    Joined:
    Apr 6, 2002
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    We have had the same problem crop up 3-4 times over a 2 week period (after the last stable upgrade)
     
  8. WebXplosion

    WebXplosion Registered

    Joined:
    Sep 7, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here, neither of both suggestions worked.

    /etc/my.cnf is only this:
    Code:
    [mysqld]
    set-variable = max_connections=500
    safe-show-database
    and ps ax |grep mysql:
    Code:
    root@t1 [~]# ps ax |grep mysql
    14945 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid
    14965 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14966 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14967 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14968 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14969 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14970 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14971 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14972 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14973 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    14974 ?        S      0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/t1.webxplosion.net.pid --skip-locking
    15063 pts/1    R      0:00 grep mysql
    Any other suggestions please?

    I'm not 100% sure but it seems that this started happening after I last updated.
    CPU load now topping to 50% and I'm starting to get a little nervous :P
     
    #8 WebXplosion, Nov 8, 2004
    Last edited: Nov 8, 2004
  9. damainman

    damainman Well-Known Member

    Joined:
    Nov 13, 2003
    Messages:
    515
    Likes Received:
    0
    Trophy Points:
    16
    Considering more then one person is having this problem, has a bug been submitted :)?
     
  10. WebXplosion

    WebXplosion Registered

    Joined:
    Sep 7, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Not by me at least... should I do so?

    I tried to use the suggestions provided in: http://forums.cpanel.net/showthread.php?t=14361&page=2&pp=15

    My cpu load is gone for now but I'm still getting the list above on "ps ax |grep mysql".
    So we'll see how it goes...

    In my.cnf I the mysql sock line for me had to be:
    /var/lib/mysql/mysql.sock
    Rather than
    /tmp/mysql.sock

    Only that first line worked, when using the 2nd I got connection errors on the sock file.
    Even after:
    ln -s /tmp/mysql.sock /var/tmp/mysql.sock
    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
     
    #10 WebXplosion, Nov 8, 2004
    Last edited: Nov 9, 2004
  11. WebXplosion

    WebXplosion Registered

    Joined:
    Sep 7, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Nope that didn't work.

    CPU Load is now reachin 99.9% and I'm about to go nuts.
    Can anyone from cPanel take a look at this for it obviously had something to do with the update I installed recently.
     
  12. Myacen

    Myacen Well-Known Member

    Joined:
    Apr 6, 2002
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    16
    I belive the problem is related to backups.
     
Loading...

Share This Page