MySQL MHA不同用户查看不同表

-- 修改密码
UPDATE mysql.user set authentication_string =PASSWORD('Emm~!2020@mysql')  WHERE user = 'root' and host = '%';
FLUSH PRIVILEGES;
SELECT Host, User, plugin from user;


-- 新建用户对应赋权查看不同的表

INSERT INTO mysql.user(Host, User,  authentication_string, ssl_cipher, x509_issuer, x509_subject) VALUES ('%', 'contract', PASSWORD('Emm~!2023@contract'), '', '', '');

INSERT INTO mysql.user(Host, User,  authentication_string, ssl_cipher, x509_issuer, x509_subject) VALUES ('%', 'sonar', PASSWORD('Emm~!2023@sonar'), '', '', '');
INSERT INTO mysql.user(Host, User,  authentication_string, ssl_cipher, x509_issuer, x509_subject) VALUES ('%', 'devops', PASSWORD('Emm~!2023@devops'), '', '', '');
INSERT INTO mysql.user(Host, User,  authentication_string, ssl_cipher, x509_issuer, x509_subject) VALUES ('%', 'esign', PASSWORD('Emm~!2023@esign'), '', '', '');




grant all privileges on sonar.* to sonar@'%' identified by 'Emm~!2023@sonar';
grant all privileges on devops.* to devops@'%' identified by 'Emm~!2023@devops';
grant all privileges on wlfw_contract.* to contract@'%' identified by 'Emm~!2023@contract';


grant all privileges on esign6_docs.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_evidence.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_file_system.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_manage.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_nacos.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_seals.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_signs.* to esign@'%' identified by 'Emm~!2023@esign';
grant all privileges on esign6_unified_portal.* to esign@'%' identified by 'Emm~!2023@esign';




FLUSH PRIVILEGES;

接下来是Oracle的

 
 -- Oracle 新建用户和授权表空间
 create user rxcx identified by "Cnpc2023@rxcx";
 create user db_material identified by "Cnpc2023@db_material";
 create user db_nacos identified by "Cnpc2023@db_nacos";
 create user klyc identified by "Cnpc2023@klyc";

create tablespace rxcx datafile '/opt/oracle/oradata/SCNPCLTP122/rxcx.dbf' size 20m;
alter user rxcx default tablespace rxcx;
grant create session,create table,unlimited tablespace to rxcx;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值