FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Problem with a disapearing mysql.sock file

 


ammonkc
I know this is a pretty common problem with mysql installations, on linux anyway. I was having some issues connecting to my mysql from a remote web app yesterday, and I rebooted the server when I got it fixed. the /tmp/mysql.sock file has disapeared after I rebooted. This has happened to me before, and its pretty annoying. I've never really been able to figure out how to fix this once it happens. I always end up reinstalling mysql, then protecting that mysql.sock file.

how do I get mysql to create a new mysql.sock file? is there anyway to do that or do I have to reinstall mysql to get that socket file back?

Also, what is the best way to protect that /tmp/mysql.sock file from getting deleted by linux? these are the mothods that I know about:
1. edit /etc/my.cnf to point to a different location other than /tmp/mysql.sock.
2. sticky the file so that it doesn't get deleted.
3. create a symlink to a different location.

What is the best way to avoid losing that socket file?
Atomo64
What distro are you using?
I'm a web admin and never had such problem, neither on my local PC's...

And to protect the .sock file, just chmod it.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.