[英]how to grant select only rows to user mysql using command line?
How am I able to grant a mysql user to only select rows in command line ie GRANT SELECT X TO USER BOB ? 我如何才能授予mysql用户仅在命令行中选择行的权限,即GRANT SELECT X TO USER BOB?
Have checked on https://dev.mysql.com/doc/refman/5.7/en/grant.html , http://www.stackoverflow.com and others. 已检查的https://dev.mysql.com/doc/refman/5.7/en/grant.html , http://www.stackoverflow.com等。
I have researched and there seems to be no conclusive answer. 我已经研究过,似乎没有结论性的答案。
I know it's a one-liner but after all I have tried, no dice. 我知道这是单线的,但毕竟我尝试过,没有骰子。
You should use the for all the table or 您应该对所有表格使用或
GRANT SELECT ON your_db_name.* TO ''bob'@'%';
for a single table 一张桌子
GRANT SELECT ON your_db_name.yor_table_name TO ''bob'@'%';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.