MySQL命令创建只读权限用户

查询用户

select user,authentication_string,host,Select_priv,Delete_priv from mysql.user;

创建用户

CREATE USER 'read01'@'%' IDENTIFIED BY 'Byjz@read!';

只读权限

GRANT SELECT ON . TO 'read01'@'%';

刷新权限

flush privileges;

删除用户

DROP USER 'read01'@'%';

posted @ 2023-08-30 20:47  靠谱杨  阅读(20)  评论(0编辑  收藏  举报