15

I am using phpmyadmin to control mysql on my server, now i want to create some users to access this admin tool, what i want is to make each user can create databases but can't see others databases.

Is that possible and how?

25

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
  • Thanks! Just what I was looking for. Any recommendation for which Host to assign to the user? I just chose 'Any host'. – Sherri Apr 19 '17 at 12:39
2
  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.

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.
0

On the phpMyAdmin default page

select the database you want this user to have access to

click the privileges tab

Click on the Add a new User

Assign the User a Login Information

User name:

Host name:

Password:

Re-type:

Authentication Plugin

Where it says "Database for User Account Grant all privileges on database "database name".

tick all checkboxes in global privileges Press the "Go" button

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

This should resolve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.