mysql DCL(数据控制语句)

创建一个数据库用户yxm,具有对sakila 数据库中所有表的SELECT/INSERT

grant select,insert on sakila.* to 'yxm'@'localhost' identified by '123';

需要将yxm的权限变更,收回INSERT,只能对数据进行SELECT 操作:

revoke insert on sakila.* from 'yxm'@'localhost';

原文地址:https://www.cnblogs.com/yangxuming/p/6715025.html