zoukankan      html  css  js  c++  java
  • 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;
  • 相关阅读:
    复杂业务
    重析业务逻辑架构模式
    Katana介绍以及使用
    使用ServiceStack构建Web服务
    ASP.NET vNext 在 Mac OS
    用户端的防腐层作用及设计
    Mvc 模块化开发
    编程语言
    页面生命周期
    If you pay peanuts,you get monkeys
  • 原文地址:https://www.cnblogs.com/l10n/p/9400176.html
Copyright © 2011-2022 走看看