LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-20-2005, 07:10 AM   #1
efm
Member
 
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
marghorp
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
atom
Member
 
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.
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 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