LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 08:58 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Rep: Reputation: 75
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, 09:01 AM   #2
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Original Poster
Rep: Reputation: 75
And /usr/lib/mysql is all owned by mysql
 
Old 05-09-2004, 09: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, 12:13 PM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

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

Rep: Reputation: 269Reputation: 269Reputation: 269
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, 02:24 PM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Original Poster
Rep: Reputation: 75
> 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, 03:15 PM   #7
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Original Poster
Rep: Reputation: 75
I think I have solved this by chmof of var/lib/mysql/mysql
and /var/run/mysql
 
Old 05-09-2004, 03: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, 04:03 PM   #9
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,352

Original Poster
Rep: Reputation: 75
ROFL
 
  


Reply



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 06:23 AM
Starting a service as non root user? dee3lmo Linux - General 2 07-30-2004 07:37 PM
X server not starting as non root user Draylath Linux - Newbie 16 06-25-2004 02:02 PM
gift daemon runs as root not as user... (using apollon and the fasttrack network) skinpainting Linux - Software 1 02-03-2004 02:43 AM
Starting Up MySQL daemon tuka Linux - Software 2 08-06-2003 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:47 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
Open Source Consulting | Domain Registration