From owner-freebsd-questions@FreeBSD.ORG Sat Jan 14 20:16:00 2012 Return-Path: Delivered-To: questions@Freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 005141065675 for ; Sat, 14 Jan 2012 20:15:59 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout019.mac.com (asmtpout019.mac.com [17.148.16.94]) by mx1.freebsd.org (Postfix) with ESMTP id D6B6C8FC0A for ; Sat, 14 Jan 2012 20:15:59 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [17.153.98.129] (unknown [17.153.98.129]) by asmtp019.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LXS00CXEYUJFD10@asmtp019.mac.com> for questions@Freebsd.org; Sat, 14 Jan 2012 19:15:56 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,1.0.211,0.0.0000 definitions=2012-01-13_05:2012-01-13, 2012-01-13, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1201140216 From: Chuck Swiger In-reply-to: <0F82362E-2694-4EBC-B019-DE2F2C160D45@gmail.com> Date: Sat, 14 Jan 2012 11:15:54 -0800 Message-id: <7325D262-C6EB-42DB-870D-D3E2FAC9D0C1@mac.com> References: <0F82362E-2694-4EBC-B019-DE2F2C160D45@gmail.com> To: Paul Beard X-Mailer: Apple Mail (2.1084) Cc: FreeBSD-questions Subject: Re: Solution: mysqld fails to run, can't create/find mysql.sock X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 20:16:00 -0000 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