How to grant and revoke rights to tables using phpMyAdmin
Is phpMyAdmin capable of granting rights (permissions) on certain tables to users or roles?
When I look at the page of a database table there is no "rights" tab.
I have only found a place where I can give rights to single users.
What I need is granting some rights to several users at the same time like
grant insert, update, delete on customers to john, max, annie;
You can do that. Follow the pictures: In the "Privileges" tab which list your users click the "Edit Privileges" of the user.
Then select the database:
After that specific the privileges by checking them and then select your table as shown in the picture:
After you select your table, you can define the operations in detailed:
phpMyAdmin can't do such a granular rights setup, but you can do this with pure SQL. See this reference for details. It's basically just writing "GRANT" statements yourself which you can pass to phpMyAdmin.
The GRANT
syntax allows you to specify multiple users in a single query.:
GRANT SELECT,INSERT,UPDATE,DELETE ON customers.* TO 'john', 'annie', 'max';