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.

sometime int /TMP i lose mysql.sock

Discussion in 'General Discussion' started by Creazioni1, Feb 21, 2004.

  1. Creazioni1

    Creazioni1 Well-Known Member

    Joined:
    Dec 28, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hi
    every 8, 10 days all server lose in /tmp file

    mysql.sock -> /var/lib/mysql/mysql.sock=

    and cause bad situation for MYSQL


    Solution are 2

    >update cpanel
    or
    >ssh >> ln -s /var/lib/mysql/mysql.sock mysql.sock

    The problem is that this file delete in the night , therefore for 3 hours all mysql are down..

    HAVE you a solution?
    A cron that control this mysql.sock?
    A fix don't delete this file?

    MY /etc/fstab is so

    /dev/md0 /tmp ext3 nosuid,nodev,noexec,noatime 1 2


    i change in
    /dev/md0 /tmp ext3 nosuid,nodev,noexec 1 2

    but it's same


    THANKS

    sorry for english
     
  2. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I know using 'noatime' causes the problem.

    Did you remount the /tmp partition after you changed it? (otherwise the change won't take effect)

    You could run a cronjob the minute after it happens :
    01 04 * * * /bin/ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

    I used 04 for hour here, ofcourse you have to change that to your situation.
     
  3. Creazioni1

    Creazioni1 Well-Known Member

    Joined:
    Dec 28, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    THANKSSS


    CRON would be a good solution
    every day cron setup a new mysql.sock
    right??

    if mysql.sock there is, cron don't work.....if mysql.sock there is not...cron work fine....right??
     
    #3 Creazioni1, Feb 21, 2004
    Last edited: Feb 21, 2004
  4. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Correct, if the mysql.sock symlink is still there, execution of the cron job will result in a 'File exists' message.
     
  5. Creazioni1

    Creazioni1 Well-Known Member

    Joined:
    Dec 28, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    PERFECT
    i think is the better solution
    THANKS THANKS
     
Loading...

Share This Page