LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Starting mysql daemon as user rather than root (http://www.linuxquestions.org/questions/slackware-14/starting-mysql-daemon-as-user-rather-than-root-179587/)

arubin 05-09-2004 08:58 AM

Starting mysql daemon as user rather than root
 
I can get mysql running with mysqld_safe & if I su to root,

If I try do to this as a user I get

040509 14:51:56 mysqld started
040509 14:51:56 Can't start server : Bind on unix socket: Permission denied
040509 14:51:56 Do you already have another mysqld server running on socket: /var/run/mysql/mysql.sock ?
040509 14:51:56 Aborting

I do not have another server running.

How can I start msqld without having to su?

Thanks

arubin 05-09-2004 09:01 AM

And /usr/lib/mysql is all owned by mysql

AxeZ 05-09-2004 09:34 AM

su mysql

You have created mysql user?

arubin 05-09-2004 12:13 PM

No but my regular user does belong to the mysql group

trickykid 05-09-2004 02:07 PM

Re: Starting mysql daemon as user rather than root
 
Quote:

Originally posted by arubin
I can get mysql running with mysqld_safe & if I su to root,

If I try do to this as a user I get

040509 14:51:56 mysqld started
040509 14:51:56 Can't start server : Bind on unix socket: Permission denied
040509 14:51:56 Do you already have another mysqld server running on socket: /var/run/mysql/mysql.sock ?
040509 14:51:56 Aborting

I do not have another server running.

How can I start msqld without having to su?

Thanks

I'd advise against this. You most likely have this starting at startup, if you don't want it to start up as user root or mysql, you should use another user like nobody to start it that does not have an actual password to the system for better security reasons, etc.

Edit your /etc/rc.d/rc.mysqld scripts to start as another user.

arubin 05-09-2004 02:24 PM

> Edit your /etc/rc.d/rc.mysqld scripts to start as another user.

I do not see how I do this. I have chmodded it so anyone can run rc.mysqld but I stii lget the same error.

arubin 05-09-2004 03:15 PM

I think I have solved this by chmof of var/lib/mysql/mysql
and /var/run/mysql

PolyPerception 05-09-2004 03:40 PM

You su to root then issue this command:

Code:

mysqld_safe --user-mysql &
Really I don't think you need to su to root unless your other users can't exec mysqld_safe

arubin 05-10-2004 04:03 PM

ROFL


All times are GMT -5. The time now is 05:48 AM.