标签:rom 撤销 use 权限 sel user date drop mysq
1.创建用户
CREATE USER ‘dingyingsi‘@‘localhost‘ IDENTIFIED BY ‘dys123‘; //将该用户创建在本机上 CREATE USER ‘dingyingsi‘@‘%‘ IDENTIFIED BY ‘dys123‘; //创建的用户可以远程连接本机
2.授权
grant select,insert,update,delete,create,drop on dys.tb1 to ‘dingyingsi‘@‘localhost‘ identified by ‘dys123‘; grant all privileges on dys.tb1 to ‘dingyingsi‘@‘localhost‘ identified by ‘dys123‘;
grant all privileges on *.* to ‘dingyingsi‘@‘localhost‘ identified by ‘dys123‘;
3.撤销权限
revoke all privileges on *.* from netuser@"%"; revoke all on db1.tb1 from netuser@"%"; revoke all on db1.* from netuser@"%";
标签:rom 撤销 use 权限 sel user date drop mysq
原文地址:https://www.cnblogs.com/dingyingsi/p/8855019.html