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

Re: MySQL from ports on 3.4 - Permission errors.



I went through the exact same problem a few days ago; I did not look
closer but pkg_delete the package, and them removing all users +
directories as instructed in the message, and reinstalling it fixed it.
Apparently the uids or something changed, and it's more subtle than
you'd think (as you saw below).

> Date: Mon, 2 Feb 2004 01:56:56 -0500 (EST)
> From: Laura Speck <laura@snickers.org>
> To: misc@openbsd.org
> Cc: liu7@nerdcore.net
> Subject: MySQL from ports on 3.4 - Permission errors.
> Message-ID: <20040202014056.S17187@spike.snickers.org>
> 
> 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