Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2012 12:05:30 -0800
From:      Paul Beard <paulbeard@gmail.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        FreeBSD-questions <questions@Freebsd.org>
Subject:   Re: Solution: mysqld fails to run, can't create/find mysql.sock
Message-ID:  <483F5D6D-ED7C-4739-9579-E2AC4B7EDF7C@gmail.com>
In-Reply-To: <7325D262-C6EB-42DB-870D-D3E2FAC9D0C1@mac.com>
References:  <0F82362E-2694-4EBC-B019-DE2F2C160D45@gmail.com> <7325D262-C6EB-42DB-870D-D3E2FAC9D0C1@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_48C249F0-27D6-4933-AE32-6C39CDE0D865
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


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:=20

> 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.=20

How about=20
[ERROR] socket: /tmp/mysql.sock not found=20
and/or=20
[ERROR] socket:/tmp/mysql.sock could not be created

perhaps with a helpful hint about permissions.=20

If this was unusual, that would be one thing but I found quite a few =
references to the problem before I found the solution.=20

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?=20

> 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.=20
=20
--
Paul Beard

Are you trying to win an argument or solve a problem?=20


--Apple-Mail=_48C249F0-27D6-4933-AE32-6C39CDE0D865--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?483F5D6D-ED7C-4739-9579-E2AC4B7EDF7C>