LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mysqld + root -> ok? (https://www.linuxquestions.org/questions/linux-newbie-8/mysqld-root-ok-315253/)

efm 04-20-2005 07:10 AM

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

marghorp 04-20-2005 08:28 AM

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

atom 04-20-2005 10:19 AM

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.


All times are GMT -5. The time now is 01:21 PM.