LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-09-2004, 09:58 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
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
 
Old 05-09-2004, 10:01 AM   #2
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Original Poster
Rep: Reputation: 55
And /usr/lib/mysql is all owned by mysql
 
Old 05-09-2004, 10:34 AM   #3
AxeZ
Member
 
Registered: Sep 2002
Location: Novi Sad, Vojvodina
Distribution: Slackware, FreeBSD
Posts: 386

Rep: Reputation: 32
su mysql

You have created mysql user?
 
Old 05-09-2004, 01:13 PM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Original Poster
Rep: Reputation: 55
No but my regular user does belong to the mysql group
 
Old 05-09-2004, 03:07 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
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.
 
Old 05-09-2004, 03:24 PM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Original Poster
Rep: Reputation: 55
> 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.
 
Old 05-09-2004, 04:15 PM   #7
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Original Poster
Rep: Reputation: 55
I think I have solved this by chmof of var/lib/mysql/mysql
and /var/run/mysql
 
Old 05-09-2004, 04:40 PM   #8
PolyPerception
LQ Newbie
 
Registered: Feb 2004
Location: Fort Worth, Texas
Distribution: Slackware-9.1
Posts: 29

Rep: Reputation: 15
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
 
Old 05-10-2004, 05:03 PM   #9
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Original Poster
Rep: Reputation: 55
ROFL
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 07:23 AM
Starting a service as non root user? dee3lmo Linux - General 2 07-30-2004 08:37 PM
X server not starting as non root user Draylath Linux - Newbie 16 06-25-2004 03:02 PM
gift daemon runs as root not as user... (using apollon and the fasttrack network) skinpainting Linux - Software 1 02-03-2004 03:43 AM
Starting Up MySQL daemon tuka Linux - Software 2 08-06-2003 12:45 PM


All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration