2.1 查看用戶權限
#show grants for '用戶名'@'主機名'
mysql> show grants for 'mytest'@'%';
2.2 用戶授權
#grant 權限列表 on 數據庫名.表名 to '用戶名'@'主機名'; (多個權限需要使用逗號隔開)
mysql> grant all on *.* to 'mytest'@'%';
2.3 取消權限
#revoke 權限列表 on 數據庫名.表名 from '用戶名'@'主機名';
mysql> revoke select on company.account from 'mytest'@'%';