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

Re: MySQL from ports on 3.4 - Permission errors.



i'm running mysql on my laptop without portmap.

what are the permissions on /var/run/mysql (and the socket)
what are the permissions on /var/run (does _mysql have search perms?)
what options is the filesystem mounted with (does nodev matter?)
maybe try ktracing the server to see where it bails...


On Tue, 3 Feb 2004, Sean Kelley wrote:

> I had the same error.  Make sure you have portmap enabled
> in your rc.conf.local.
> 
> Sean
> 
> 
> On Feb 2, 2004, at 12:56 AM, Laura Speck wrote:
> 
> > 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
> 

-- 
Chris Kuethe, GCIA CISSP: Secure Systems Specialist - U of A CNS
      office: 157 General Services Bldg.    +1.780.492.8135
              chris.kuethe@[pyxis.cns.]ualberta.ca

     GDB has a 'break' feature; why doesn't it have 'fix' too?