Fine-grained GRANT permissions in MySQL


I know you can set permissions for MySQL users in the panel, but they seem to be only global (i.e., to all tables). How do I set permissions by table? For example, I’d like to grant access for a certain user only to one table, something like:

GRANT SELECT ON database.table TO ‘user’@‘localhost’ IDENTIFIED BY ‘password’;

Thanks a lot.


Did you try issuing that SQL from phpMyAdmin, or from a command-line connection to your mysql server? You’d log in as the primary user (who has full GRANT privileges) and then create the limited-access user and use the SQL you describe to grant table-level privileges.


I’m in a shared server, so apparently I can’t issue GRANT commands from the command-line or phpMyAdmin. Any other way to do it?