Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Here is the first part of my question.

Should I set up two user accounts; one for the database and another for the web server? Or is it better to have one root user for all purposes?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Typically you keep one user per daemon. So, you might have a mysqld user that is severely restricted to just being able to run mysqld, right? Then you add users inside your database using MySQL.

You would also perhaps have a www or apache user that only runs the web server. You then have code which the apache user can read, but it uses a MySQL command to connect to the MySQLd port and authenticate you by using those users you added in the previous step. Does that make sense?

It's your dev environment though...If you don't believe you're a target, well...

share|improve this answer
1  
dev environments who face the internet are always a target. –  befree42 Dec 26 '12 at 16:56
    
I was hoping it was an internal web server. –  0x90 Dec 26 '12 at 16:56
    
You can also install the OS's package, so it will setup the users and configuration directories for you and then setup your own binaries with similar permissions. (You may have to disable the distribution's binaries in init scripts.) –  billc.cn Dec 26 '12 at 20:47
    
The problem is just that i do not install packages from repo :). I know that when I install repo package, it creates config and init.d scripts for me, but I am using zipped binaries. –  madhead Dec 26 '12 at 21:17
    
What do you mean "A target"? I was just told to run the code on AWS, because we are moving there. We expect no visitors or dos attacks. –  madhead Dec 26 '12 at 21:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.