Solution: mysqld fails to run, can't create/find mysql.sock
paulbeard at gmail.com
Sat Jan 14 20:05:36 UTC 2012
On Jan 14, 2012, at 11:15 AM, Chuck Swiger wrote:
> The meaning seems obvious enough; mysqld was unable to bind to the socket, which is what perror() meant with "Permission denied":
Really? I read this:
> 120114 9:39:04 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
as "there is an existing socket that seems to be in use: what's up with that?"
The message references a file that does not exist (but that mysql will cheerfully remove if found). There was no existing socket. Those two lines, taken together, tell me that a. mysql can't run without a socket and b. it thinks another process is running, bound to a socket that doesn't exist. Clear as mud.
[ERROR] socket: /tmp/mysql.sock not found
[ERROR] socket:/tmp/mysql.sock could not be created
perhaps with a helpful hint about permissions.
If this was unusual, that would be one thing but I found quite a few references to the problem before I found the solution.
Maybe it's a housekeeping thing but why would mysql need to destroy the file it uses for a socket and then recreate it when it could simply examine it and reuse it?
> Anyway, doesn't the mysql port want to keep the socket under /var/run/mysql/mysqld.sock or some such, to avoid issues with /tmp?
Apparently not, as I commented out any reference to it in my.cnf and still saw the same messages about /tmp/mysql.sock. It seems to work if spelled out explicitly.
Are you trying to win an argument or solve a problem?
More information about the freebsd-questions