Mysql 查看所有用户

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 #查看所有用户
select CONCAT('User:',user,'@',host) from mysql.user;
 
输出:
 
 
| CONCAT('User:',user,'@',host) |
+-------------------------------+
User:adam@%                   |
User:root@127.0.0.1           |
User:root@::1                 |
User:adam@localhost           |
User:quan@localhost           |
User:root@localhost           |
+-------------------------------+
rows in set (0.00 sec)
 
 
#查看用户权限
 
show grants for 'adam'@'localhost';
 
输出:
 
+-------------------------------------------------------------------------------------------------------------+
GRANT USAGE ON *.* TO 'adam'@'localhost' IDENTIFIED BY PASSWORD '*B2652B2C91E14A2B0088107BB28698EA57F78E01' |
GRANT ALL PRIVILEGES ON `wujin`.* TO 'adam'@'localhost'                                                     |
+-------------------------------------------------------------------------------------------------------------+
rows in set (0.00 sec)

Adam博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论
  • Powered by bjyblog modified by Adam © 2014-2025 www.lixiaopeng.com 版权所有 ICP证:鲁ICP备15039297号
  • 联系邮箱:14846869@qq.com