PDA

View Full Version : Missing mysql.sock



MacToph
03-30-2004, 07:11 AM
Hello,
I recently tried to upgrade an open-source course management system on my 2.0 account and during the upgrade, my mysql.sock file was somehow deleted, leaving all of my databases inaccessible. WH helped me to get things fixed quick enough, but didn't have any ideas on why the mysql.sock file was deleted- does anyone out there have any ideas as to what might have caused that? I'm hesitant to try the upgrade again for fear it will do the same thing- If you want more details, I also have a post on the Moodle forums at:

http://moodle.org/mod/forum/discuss.php?d=6534

Any help or insight is greatly appreciated!!

Thanks,
Christopher

mzleslie
05-20-2004, 09:01 AM
I don't have any answers for you, but I wanted to add that my mysql.sock seems to be missing as well. I was making an edit to a table this morning when my connection just went away and came back with an error message that it could no longer connect through .sock.

Iupgraded my package a few days ago but I wouldn't think that would cause a file to be deleted. Hmmm.

jalal
05-20-2004, 11:02 AM
If the socket is deleted, then it should be enough to stop the mysqld process and then start it again, it will recreate the socket on start up.
e.g.:
$ /etc/rc.d/init.d/mysqld stop
$ /etc/rc.d/init.d/mysqld start

The location of the socket is spec'd in the file /etc/my.cnf, if you want to change it.

See section 18.6 and 18.2.2 of the MySQL manual for further details...

mzleslie
05-20-2004, 04:06 PM
Well, it was a simple fix - go to your manager page, site management then click on site parameters and restart the vds. A new MySQL.sock was create and all is well.

From the pp, sounds like restarting MySQL would cure it easily as well.

nikremt
12-04-2006, 07:37 AM
sounds like restarting MySQL would cure it easily as well.

I have this same problem, but restarting VPS using the control panel did not re-create the mysql.sock file for me. When I type: /etc/rc.d/init.d/mysqld stop it waites for a few seconds and then outputs to the terminal: No mysqld pid file found. Looked for /var/run/mysql/mysqld.pid.

I am getting worried because I do not have a backup of my most recent changes to the database, and I cannot connect to it to do a mysqldump backup. I get the error message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2). every time I try to connect.

Any more suggestions?

rolling
12-04-2006, 07:45 AM
Well that means it isn't running. You can check by typing ps -auxw

Try starting MySQL by typing /etc/rc.d/init.d/mysqld start