# 角色 Joe 现在是团队的 DBA,公司数据分析组有 Fred、Alice、James、Jone 四位成员,现在Joe需要给数据分析组授权,允许他们 查询 MySQL 8 服务器 goods 数据库中的所有表,*规范*的操作应该是 ## 答案 ```mysql create role analysis; grant analysis to fred, alice, james, jone; grant select on goods.* to analysis; flush privileges; ``` ## 选项 ### 将来人员变动管理会很繁琐 ```mysql grant select on goods.* to fred, alice, james, jone; ``` ### 错误的语法 ```mysql create role analysis; grant analysis to fred, alice, james, jone; grant all on all tables in schema goods to analysis; flush privileges; ``` ### 过度授权 ```mysql create role analysis; grant analysis to fred, alice, james, jone; grant select on *.* to analysis; flush privileges ; ```