Solution: mysqld fails to run, can't create/find mysql.sock
paulbeard at gmail.com
Sat Jan 14 18:43:46 UTC 2012
Woke up to a screenful of error messages about failed mysql backups and found that for some reason, mysql was refusing to run at all. The issue was not just a missing mysql.sock but an inability to create one. I could do it by hand or at least create a file with the same name and permissions but it would be removed on the next attempt and then not replaced. Turns out the permissions on /tmp were not right. I didn't note them beforehand but setting them 1777 solved it.
I would be interested in knowing how those permissions got changed. I rebooted the system early on in the process as I kept seeing messages like this:
120114 9:39:04 [ERROR] Can't start server : Bind on unix socket: Permission denied
120114 9:39:04 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
Those are rubbish as error messages as they don't say the file can't be created or give any indication of the actual problem.
This is all more a problem for the mysql developers than FreeBSD but I am posting it to the list in case anyone else gets bitten by it.
Are you trying to win an argument or solve a problem?
More information about the freebsd-questions