msql授权

mysql权限分配

标签(空格分隔): 工作总结


update mysql.user set authentication_string=password(‘qj12345678@’) where user=‘aliyun_root’;

change master to master_host=‘rm-2ze017xqkb7dn9006.mysql.rds.aliyuncs.com’,master_port=3306,master_user=‘repl’,master_password=‘repl123456@’,master_auto_position=0;

root allqj123456@

运维(Operation and maintenance)

dbadmin devops123456@

grant all privileges on *.* to root@'%' identified by 'devops123456@' with grant option;

create user dbadmin identified by 'devops123456@';
grant all privileges on *.* to dbadmin@'60.2.82.30' identified by 'devops123456@' with grant option;

grant all privileges on *.* to admin@'%' identified by 'devops123456@' with grant option;

grant all privileges on *.* to dbadmin@'39.105.191.156' identified by 'devops123456@' with grant option;

开发组长(Development team leader)

dbadmin_leader dtl123456@

create user dbadmin_leader identified by 'dtl123456@';
grant all privileges on *.* to dbadmin_leader@'60.2.82.30' identified by 'dtl123456@';

开发和程序 (Development and procedures)

dbadmin_app dap12345678@

create user dbadmin_app identified by 'dap12345678@';
grant SELECT, INSERT,UPDATE,DELETE,EXECUTE,EVENT,TRIGGER,ALTER,FILE, CREATE VIEW, SHOW VIEW on *.* to dbadmin_app@'60.2.82.30' identified by 'dap12345678@';

grant all privileges on *.* to dbadmin_app@'39.105.191.156' identified by 'dap12345678@';

测试人员(Testers)

dbadmin_test ts12345678@

create user dbadmin_test identified by 'ts12345678@';
grant SELECT, CREATE VIEW, SHOW VIEW on *.* to dbadmin_test@'%' identified by 'ts12345678@';

grant SELECT, CREATE VIEW, SHOW VIEW on *.* to root@'%' identified by 'ALLqj123456@#$';

复制权限

prod: repl qj123456@
pred: repl repl123456@

hr_record_message_num

# 创建用户
db.createUser(
  {
    user: "dbadmin",
    pwd: "qj123456789", 
    roles: [{ role: "readWrite", db: "wecenter" }]
  }
)
# 更新用户
db.updateUser(
  "dbadmin",
    { 
      pwd: "qj123456789",  
      roles: [{ role: "dbOwner", db: "brd_contract_management_new" }]  
    }  
)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值