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?
Ken.
use webhosting control panel, ispconfig, virtualmin, vhcs, cpanel, hsphere, etc.
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.