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 have a VPS and have set up vhosts so I cant host websites, im wanting to give each user the ability to create there own db within mysql, I have phpmyadmin installed so can login to that to view the db's, but I want the 'user' to be able to log in and only see there databases. what is the best way of dealing with this? thanks

share|improve this question
If you have to ask, hosting is probably not a good idea. – adaptr Dec 16 '11 at 15:38

If I remember well the user only sees the databases in phpmyadmin what he/she has rights.

share|improve this answer
So I guess create the db user at user creation then create a db for the user give permissions? the down side is if I gave them permission to create db's there would be not limit to how many dbs they could create – Elgoog Dec 15 '11 at 21:17
Create a separate database for every user and no other database for them. I think it's enough. – Stone Dec 15 '11 at 21:19
@Elgoog Does it really matter if they make a bunch of databases? – ceejayoz Dec 15 '11 at 21:47
I guess not, but I dont want the system to be 'to' open to abuse – Elgoog Dec 15 '11 at 21:53

Use phpmyadmin: execute the GRANT query within the phpmyadmin query tab, repeat this process for other hosts you want to grant access for.

Edit the file for your controlled users granted access by the MYSQL GRANT query. Essentially what you are doing is provided segmented access, and seperate Login and permissions for users you specify. see the following link for more info: click this!

share|improve this answer

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.