问题
I want to hide certain tables (some definition tables) in the database from certain users. There is this mysql.tables_priv table which is empty. Should I insert something in that table to make it happen and what should be the value of 'table_priv' column?
回答1:
You should be looking into the SQL GRANT command. With GRANT, you can assign privileges to users like this:
GRANT SELECT ON table TO user;
回答2:
If the tables_priv is empty, i believe it means no privileges has been granted for that database table. You can do a quick test and grant select on database.table_name to user and see if a row appears in that table. But normally your grants on tables appear in that table.
来源:https://stackoverflow.com/questions/10295707/mysql-hide-certain-tables-from-certain-users