How to give access only to phpMyAdmin

Alex used Ask the Experts™
I have a website with 2 databases. I want to give to a colleague, access only to phpMyAdmin.

I don't want to let him log in into plesk and afterwards open the webadmin. I have to protect my personal sensitive data, the other db etc.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Create user and grant privileges to as their will only let them access the database.

is phpadmin in a seperate folder that the db etc if so put his login in htaccess in that folder and not in th other one with the db etc
Abhijeet RananawareWeb & Mobile Developer

Other solution will install phpmyadmin in domain webspace for eg like this


So it will be directly accessible .

Mark BradyPrincipal Data Engineer

usually you will access it by typing


Most servers are localhost but you need to find out what your server is referenced by. Once you create an account for the new user(s) and set their permissions very tight, they can get into the database and view stuff but can not make any changes. you can limit their use to a single table if you like and limit exactly what they are allowed to do. If they try anything else, they will get a permission denied error.
Kalmax was on to the right idea, but that document does not look too helpful to me if you already have phpMyAdmin installed.

Go into phpMyAdmin and click the privileges tab. Add a new user and password for localhost give it NO database and NO privleges. Click on 'GO'.

Next, go down to the SECOND box, database specific privileges and select the database you want this user to have access to. Press 'GO'

When the privilege list shows up grant  the privileges.

To grant another databases access, click on 'Privileges' and select the user from the list (icon on right hand side). Go down to the second box and select the next database and carry on as before.

When done click Privileges and scroll to the bottom. In the coloured box find the link Reload Privileges and click it.

Finally, the schema database might be visible, if so the find and add this line to it

$cfg['Servers'][$i]['hide_db'] = 'information_schema';

and restart MySQL

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial