xiaobin_hlj80

https://blog.csdn.net/xiaobin_HLJ80 http://blog.chinaunix.net/uid/31552151.html

导航

Create User - mysql

Create User


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

MariaDB [(none)]> CREATE USER 'tdtc2022'@'%' 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 'tdtc2022'@'%';
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

posted on 2016-02-14 17:58  xiaobin80  阅读(302)  评论(0编辑  收藏  举报