How to Grant MySQL Privileges with PHPMyAdmin

Managing MySQL from the command line is not exactly what one would call quick and easy. Also, there may be times when you do not have immediate access to SSH or have the time to type in multiple commands. Fortunately, phpMyAdmin offers a user-friendly and fast approach to managing your databases. For example, you can easily grant users privileges, both globally and to specific databases.

To grant global privileges to users, follow these steps:

  1. Login to phpMyAdmin from your web browser (often http://yourdomain.tld/phpmyadmin)
  2. Click the Users tab
  3. Find the user you want to edit and click “Edit Privileges”
  4. Select any privileges you want to grant.
  5. Click “Go”

For database-specific privileges, follow steps 1-3, but then follow these steps:

  1. Scroll down to “Database-specific privileges”
  2. Select the database you want to add privileges for and type the hostname (default is % for all)
  3. Click “Go”
  4. Verify that the header reads that you are granting privileges for your specific database.
  5. Check the privileges you want to grant
  6. Click “Go”

It is that simple. You can always later revoke any privileges you have granted or give multiple users privileges to a single database.











Comments: