码迷,mamicode.com
首页 > 数据库 > 详细

Create User - mysql

时间:2016-02-14 18:19:15      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:

Create User


MariaDB [(none)]> CREATE USER ‘DBAdmin‘@‘%‘ 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‘@‘%‘ 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)]> show grants for ‘DBAdmin‘;
+-----------------------------------------------------------------------------------------------------------------------------------+
| Grants for DBAdmin@%                                                                                                              |
+-----------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO ‘DBAdmin‘@‘%‘ IDENTIFIED BY PASSWORD ‘*8640888BFB179C50EF0B4DE12251E66B4FB18A77‘ WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> \q
Bye

Create User - mysql

标签:

原文地址:http://www.cnblogs.com/xiaobin-hlj80/p/5189419.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!