Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2012 11:15:54 -0800
From:      Chuck Swiger <>
To:        Paul Beard <>
Cc:        FreeBSD-questions <>
Subject:   Re: Solution: mysqld fails to run, can't create/find mysql.sock
Message-ID:  <>
In-Reply-To: <>
References:  <>

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?


Want to link to this message? Use this URL: <>