[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MySQL from ports on 3.4 - Permission errors.



Hi,

Apologies if this post is redundant. I've been looking at archives for
about 5 hours now with no avail.

I installed MySQL from ports - server and client. The install went fine,
and my my.cnf is set up like so:

[client]
port            = 3306
socket          = /var/run/mysql/mysql.sock

[mysqld]
port            = 3306
socket          = /var/run/mysql/mysql.sock

I invoke mysql by running this command:

/usr/local/bin/safe_mysqld --user=_mysql
	--socket=/var/run/mysql/mysql.sock &

When I try to start the server, I am getting this in my error log:

040202  1:26:46  Can't start server : Bind on unix socket: Permission
denied
040202  1:26:46  Do you already have another mysqld server running on
socket: /var/run/mysql/mysql.sock ?
040202  1:26:46  Aborting
040202  1:26:46  /usr/local/libexec/mysqld: Shutdown Complete
040202 01:26:46  mysqld ended

There is no server running, so I am sure this is a permissions problem. I
ran the above command with --user=root, and the server started fine.
Running mysqld as root will be my last resort, but I'd rather try and get
it running under _mysql instead so it will be more secure.

The part that baffles me is that /var/run/mysql is owned by _mysql._mysql.
So, theoretically, the _mysql user should have no problem writing to that
directory. I am just wondering if anyone sees a flaw in anything, or has
encountered this problem. It's a fresh install of 3.4 (stable, not
current) and the first install of MySQL on the system. I constantly have
issues and have seen other people have issues with mysql.sock on OpenBSD
boxes.

If anyone can help, thanks a lot!

--
Laura