• mysql创建应用账号


    修改root账号  root  qwer123
    use mysql;
    update mysql.user set authentication_string=password('qwer123') where user='root' ;
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'qwer123' WITH GRANT OPTION;
    flush privileges;
    
    
    use mysql;
    drop user root@'%';
    update mysql.user set authentication_string=password('qwer123') where user='root' ;
    flush privileges;
    
    
    
    创建应用账号: teachinguser  qwer123
    use mysql;
    CREATE USER 'teachinguser'@'10.10.10.%' IDENTIFIED BY 'qwer123';
    CREATE USER 'teachinguser'@'localhost' IDENTIFIED BY 'qwer123';
    
    grant all privileges on basedata.*               to teachinguser@'10.10.10.%';                         
    
    grant all privileges on basedata.*               to teachinguser@'localhost';                         
    flush privileges;
    
    
    创建只读账号: rouser   qwer123
    use mysql;
    CREATE USER 'rouser'@'10.10.10.%' IDENTIFIED BY 'qwer123';
    CREATE USER 'rouser'@'localhost' IDENTIFIED BY 'qwer123';
    
    grant select  on *.* to rouser@'10.10.10.%';
    grant select  on *.* to rouser@'localhost';
    flush privileges;
    
    
    
    创建DBA账号:  dbauser   qwer123
    use mysql;
    CREATE USER 'dbauser'@'10.10.10.%' IDENTIFIED BY 'qwer123';
    CREATE USER 'dbauser'@'localhost' IDENTIFIED BY 'qwer123';
    
    grant all privileges on *.* to dbauser@'10.10.10.%' WITH GRANT OPTION;
    grant all privileges on *.* to dbauser@'localhost' WITH GRANT OPTION;
    flush privileges;
  • 相关阅读:
    OC与Swift的区别二(常量、变量、运算符)
    OC与Swift的区别一(文件结构)
    OC对象的归档及解档浅析
    OC单例模式的实现
    oc文件基本读写及操作
    IOS之沙盒(Sandbox)机制
    IOS开发之KVC与KVO简述
    SpringMVC控制器配置文件
    spring常用的连接池属性文件配置
    Struts2文件上传方式与上传失败解决方式
  • 原文地址:https://www.cnblogs.com/l10n/p/9400176.html
Copyright © 2020-2023  润新知