zoukankan      html  css  js  c++  java
  • Create User

    Create User


    MariaDB [(none)]> CREATE USER 'DBAdmin'@'localhost' IDENTIFIED BY 'mypasswd';
    Query OK, 0 rows affected (0.00 sec)

    MariaDB [(none)]> CREATE USER 'tdtc2014'@'localhost' IDENTIFIED BY 'qazxsw';
    Query OK, 0 rows affected (0.00 sec)

    MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'DBAdmin'@'localhost' WITH GRANT OPTION;
    Query OK, 0 rows affected (0.00 sec)

    MariaDB [(none)]> GRANT SELECT,INSERT,UPDATE,DELETE ON carnumber.* TO 'tdtc2014'@'localhost';
    Query OK, 0 rows affected (0.00 sec)

    MariaDB [(none)]> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    MariaDB [(none)]> show grants for 'DBAdmin';
    +-----------------------------------------------------------------------------------------------------------------------------------+
    | Grants for DBAdmin@%                                                                                                              |
    +-----------------------------------------------------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'DBAdmin'@'localhost' IDENTIFIED BY PASSWORD '*8640888BFB179C50EF0B4DE12251E66B4FB18A77' WITH GRANT OPTION |
    +-----------------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)

    MariaDB [(none)]> q
    Bye

  • 相关阅读:
    ES6语法:var、let、const的区别详解
    idea新建springboot项目
    Serlvet之cookie和session学习
    常见排序算法
    Spring MVC拦截器学习
    分组数据
    redis数据库学习
    redis实现排行榜
    redis整合springboot的helloworld
    dubbo整合springboot最详细入门教程
  • 原文地址:https://www.cnblogs.com/xiaobin-hlj80/p/5189419.html
Copyright © 2011-2022 走看看