Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-20-2005, 07:10 AM   #1
Registered: Apr 2005
Location: indonesia
Distribution: suse 10
Posts: 101

Rep: Reputation: 15
mysqld + root -> ok?

hello, i'm using suse 9.2 with mysql installed through rpm,
right now, i run mysql using # /usr/sbin/mysqld --user=root, and it's working,
all i want to ask is, is it ok to run mysqld as root like this? because i think i've seen somewhere
that i should use other account to run mysqld,
and, btw, is running mysql daemon by using # /usr/sbin/mysqld the same as # /usr/sbin/mysql start
thank you
Old 04-20-2005, 08:28 AM   #2
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
You should create a user like mysql. Why? Eventually a cracker (hackers do not crack) could break in your machine through mysqld (doing a buffer overflow) and getting the mysqld user login (in your case root privileges). To prevent this, you should create a user that has limited privileges and don't forget to change permissions to mysql folders so that user can read write to them.

As for the other question regarding mysqld and mysql start, I suggest you read the documentation (I don't know the answer)...
Old 04-20-2005, 10:19 AM   #3
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
I don't think mysql actually starts as root unless forced to... weird. Mine doesn't.

I'd definitely not recommend it. It might even expose you to a symlink attack. And, if you're not careful (and leave a bug allowing arbitrary code execution in your php) you can get left without more than a database. Definitely not recommended.


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
chroot mysqld gk_ Linux - Security 2 08-16-2005 11:26 PM
chrooting mysqld gk_ Linux - Software 2 08-10-2005 12:13 PM
mysqld on startup... dark poet Linux - Newbie 8 10-05-2003 12:16 AM
mysqld ended.. xdrainox Slackware 9 10-02-2003 04:26 PM
Mysqld cinnix Linux - General 4 07-08-2001 01:42 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:59 PM.

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