mysql - 选择多个表的权限

标签 mysql privileges mysql-error-1064 sql-grant

如何在一条语句中授予对多个表的选择权限?

mysql> grant select on dbName.crw_changes to sink;
Query OK, 0 rows affected (0.02 sec)

mysql> grant select on dbName.crw_changes, dbName.bs_services to sink;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' dbName.bs_services at line 1

最佳答案

您不能在标准 SQL 中执行此操作。允许多个用户,但只能一张表。

大多数 SQL 方言通常也是如此。存在限制的原因有很多,最显着的是与检查单独表的权限有关,尽管它们在 1980 年代可能比现在更相关。

关于mysql - 选择多个表的权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1388237/

相关文章:

c# - 我得到数据绑定(bind) : 'System.Data.DataRowView' does not contain a property with the name 'productID'

app-store-connect - 在 iTunes Connect 中限制技术用户的访问

windows - 我发现这段代码可以获取 Windows 写入权限,但它不起作用

Mysql建表错误代码

MySQL 查询语句错误

php - MySql 随机化最后 10 行

mysql - 如何获取结果集中每种类型记录的计数

MYSQL使用AS或其他变量查询列

php - 让用户根据 CodeIgniter 中的角色/权限访问 Controller

php - Mac OSX Apache 写入权限