Server Fault is a question and answer site for system and network administrators. 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

I've a VPS and am hosting a few peoples websites, namely people who I will have a lot of contact with although would like to provide what I can without being there to do it.

I have written a script to add a sample database and user upon my "account" creation script, i.e.:

CREATE DATABASE <username>_main
GRANT ALL ON <username>_main.* 
    TO <username>@localhost 
    IDENTIFIED BY 'randomfoobar';

I am unsure about this, would they need to contact me to run the script to add another database? I was kind of wanting it so they had phpmyadmin (not much trouble for me) and then log in as their user/password, then have a clean phpmyadmin interface where they can add databases and whatnot, of course without affecting others.

Is this possible with mysql? or would I need to completely separate the mysql portion for each user so that they can create databases freely, but not affect other users?


share|improve this question
up vote 0 down vote accepted

If you give people phpMyAdmin and enough privs to create databases, they can create as many databases as they want; and if you give them permissions to grant themselves access to their newly created databases, then you also give them permissions to fiddle with the permissions of anyone else's databases.

You either need to run a separate database server instance for each customer, and let them do their own thing (although it's still open to resource abuse), or put some sort of frontend in place that validates the user's request and does the work on their behalf only if it meets your constraints.

share|improve this answer
Thank you for that information, It'd be kind of fun to write some sort of front end with simple accounts. I will do that after I review some hosting panels and see if they provide some good straightforward MySQL management first. ~Ken – Alexander Jul 22 '11 at 2:04

use webhosting control panel, ispconfig, virtualmin, vhcs, cpanel, hsphere, etc.

share|improve this answer
I'll look in to these, some look like they have client logins so I can just manually strip them down to mysql only. – Alexander Jul 22 '11 at 2:04

Your Answer


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.