我已经为 user1 找到了如下授权。它在开头描述了 mydb.* 上的授权,然后它也提供了表特定的访问权限。那么最终的拨款模式是什么?这其中的任何一项是否会覆盖另一个,或者它有点多余,并且 user1 将拥有所有表的所有特权,而不管具体的授权如何。
MariaDB [mysql]> show grants for 'user1';
+---------------------------------------------------------------------------------------------------------------+
| Grants for user1@% |
+---------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'user1'@'%' IDENTIFIED BY PASSWORD '*xyz' |
| GRANT ALL PRIVILEGES ON `mydb`.* TO 'user1'@'%' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `mydb`.`table1` TO 'user1'@'%' |
| GRANT SELECT, INSERT, UPDATE ON `mydb`.`table2` TO 'user1'@'%' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `mydb`.`table3` TO 'user1'@'%' |
+---------------------------------------------------------------------------------------------------------------+