How to create separate users in phpmyadmin, each one can't see others databases?

Try this:

  1. On the phpMyAdmin default page (localhost) click on the "Privileges" link
  2. Click on the "Add a new User link"
  3. Assign the User a login and password
  4. Where it says "Database for User" select "None"
  5. Leave all checkboxes in global privileges unchecked
  6. Press the "Go" button

You should see the new user in the User overview. Global privileges should say "Usage".

  1. Click on the edit icon next the the User's account
  2. Under "Database-specific privileges" where it says "Add privileges on the following database" chose the database(s) you wish to assign to the user
  3. Assign the User whatever privileges you wish them to have for that database
  4. Press the "Go" button

  1. Login to phpMyADmin
  2. Go to Privileges
  3. Click Add a new User
  4. Type the access info you want in the Login Information area (username, host, password)
  5. Click on the radio button for Create database with same name and grant all privileges
  6. Click Go.

That's it.

Note. I prefer to have a combination where the username is the same as the database name - some may argue against it. I'm using phpMyAdmin version 3.3.2.


When you login to phpMyAdmin as the root user you are able to view ALL the databases and perform operations on any of them.

If you want to limit access to only a specific user:

  • Create a user for the specific database e.g user1 with their password1
  • Then on the phpMyAdmin Login page if the user enters their user1 and password1 they will only have access to the specific database.

Then follow the step's from intlect's answer to create a users and assign them to a specific database:

  1. Login to phpMyADmin.
  2. Go to Privileges.
  3. Click Add a new User.
  4. Type the access info you want in the Login Information area (username, host, password)
  5. Click on the radio button for Create database with same name and grant all privileges.
  6. Click Go.

Tags:

Mysql

Php