`
coffee_yan
  • 浏览: 35586 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

MySQL常用命令及SQL语句

阅读更多
用户相关:
//创建aaa用户(主机%代表任意ip客户端),并授权test库所有表的所有权限,密码为123
mysql> grant all privileges on test.* to 'aaa'@'%' identified by '123';

//刷新授权使生效
mysql> flush privileges;

//查询所有mysql用户
mysql> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *FAAFFE644E901CFAFAEC7562415E5FAEC243B8B2 |
| root | 127.0.0.1 | *FAAFFE644E901CFAFAEC7562415E5FAEC243B8B2 |
+------+-----------+-------------------------------------------+
2 rows in set (0.00 sec)






分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics