To allow someuser to do SELECTs on mydb, I can execute the following statement:
GRANT SELECT ON mydb.* TO 'someuser'@'somehost';
Suppose that I want allow SELECTs on only two tables: event and event_detail.
I guess I can do the following:
GRANT SELECT ON mydb.event TO 'someuser'@'somehost';
GRANT SELECT ON mydb.event_detail TO 'someuser'@'somehost';
Would the following also work? (Supposing no other tables are matched)
GRANT SELECT ON mydb.event* TO 'someuser'@'somehost';
No – wildcards can only be used for entire table or database names.
You’ll have to either type the grant statement for every table explicitly, or write a script or program to do it for you.