mysql创建用户名和授权

创建用户名

set global validate_password_policy=0;

set global validate_password_length=1;

create user 'test'@'%' identified by '123456'

赋予权限 all(代表所有) 可选(select,insert,update,delete)

grant all on *.* to 'test'@'%' identified by '123456' with grant option;

flush privileges(刷新权限)或者重启mysql服务

回收权限

revoke  all privileges on *.* from 'imooc'@'%';

发布了30 篇原创文章 · 获赞 13 · 访问量 9997

猜你喜欢

转载自blog.csdn.net/chushudu/article/details/81940654