[英]mysql grant select privilege on only one table and some columns of it
I have a table with around 10 columns I have created a user with no privileges select. 我有一个大约10列的表我创建了一个没有权限选择的用户。
Now I want it to grant only select privileges to only that table and if possible only 2-3 columns. 现在我希望它只为该表授予select权限,如果可能的话只允许2-3列。
https://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-column-privileges
GRANT SELECT (col1,col2) ON database.table TO 'someuser'@'localhost' IDENTIFIED BY 'password';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.