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

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 14, 2012, at 10:17 AM, Paul Beard wrote:
> I would be interested in knowing how those permissions got changed.

Someone or something running as root changed them.

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


The meaning seems obvious enough; mysqld was unable to bind to the socket, which is what perror() meant with "Permission denied":

     13 EACCES Permission denied.  An attempt was made to access a file in a way forbidden by its file access permissions.

Either /tmp was unwritable for mysqld due to not having 1777 perms, or /tmp/mysql.sock probably already existed but was owned by root and not the user mysqld runs as.

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?

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7325D262-C6EB-42DB-870D-D3E2FAC9D0C1>