FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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.
Related topics
Problem With Databse, and file management.
php can't connect to mysql
Problem with MySQL Server Please Help!!
error: Can't connect to local mysql server through socket
Problem with mysql
What happened to the server 2?
Mysql Server Down?
MYSQL Database Error on Server 2
Experience of emoving mysql in debian forcefully
Problem with Mybb :: Changing DB Username
I am having problem again...
Server 2: Mysql Down
Flv file problem
Hack to fix when MySQL crashes on Linux servers
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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