Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
dev environments who face the internet are always a target. – user151547 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.) – 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .