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'@'%';

你可能感兴趣的:(mysql,数据库)