数据库创建只读用户

show databases;

create user reader@'%' identified by 'Vrx#7z9bXX';

grant  select  on zhyly_bpm.* to reader@"%"; #添加对应库的读权限给reader用户
grant  select  on zhyly_oss.* to reader@"%";
grant  select  on zhyly_message.* to reader@"%";
grant  select  on zhyly_uims.* to reader@"%";
grant  select  on zhyly_uims_light.* to reader@"%";
grant  select  on zhyly_major.* to reader@"%";

FLUSH PRIVILEGES;
posted @ 2022-11-02 09:57  安生丶  阅读(31)  评论(0编辑  收藏  举报