mysql shell 查看 所有用户的 授权列表

[root@localhost ~]# mysql -h localhost -u root -p 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 166476
Server version: 5.6.25 MySQL Community Server (GPL)


Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



mysql> select * from information_schema.user_privileges;
+----------------------------+---------------+-------------------------+--------------+
| GRANTEE                    | TABLE_CATALOG | PRIVILEGE_TYPE          | IS_GRANTABLE |
+----------------------------+---------------+-------------------------+--------------+
| 'root'@'localhost'         | def           | SELECT                  | YES          |
| 'root'@'localhost'         | def           | INSERT                  | YES          |
| 'root'@'localhost'         | def           | UPDATE                  | YES          |
| 'root'@'localhost'         | def           | DELETE                  | YES          |
| 'root'@'localhost'         | def           | CREATE                  | YES          |
| 'root'@'localhost'         | def           | DROP                    | YES          |
| 'root'@'localhost'         | def           | RELOAD                  | YES          |
| 'root'@'localhost'         | def           | SHUTDOWN                | YES          |
| 'root'@'localhost'         | def           | PROCESS                 | YES          |
| 'root'@'localhost'         | def           | FILE                    | YES          |
| 'root'@'localhost'         | def           | REFERENCES              | YES          |
| 'root'@'localhost'         | def           | INDEX                   | YES          |
| 'root'@'localhost'         | def           | ALTER                   | YES          |
| 'root'@'localhost'         | def           | SHOW DATABASES          | YES          |
| 'root'@'localhost'         | def           | SUPER                   | YES          |
| 'root'@'localhost'         | def           | CREATE TEMPORARY TABLES | YES          |
| 'root'@'localhost'         | def           | LOCK TABLES             | YES          |
| 'root'@'localhost'         | def           | EXECUTE                 | YES          |
| 'root'@'localhost'         | def           | REPLICATION SLAVE       | YES          |
| 'root'@'localhost'         | def           | REPLICATION CLIENT      | YES          |
| 'root'@'localhost'         | def           | CREATE VIEW             | YES          |
| 'root'@'localhost'         | def           | SHOW VIEW               | YES          |
| 'root'@'localhost'         | def           | CREATE ROUTINE          | YES          |
| 'root'@'localhost'         | def           | ALTER ROUTINE           | YES          |
| 'root'@'localhost'         | def           | CREATE USER             | YES          |
| 'root'@'localhost'         | def           | EVENT                   | YES          |
| 'root'@'localhost'         | def           | TRIGGER                 | YES          |
| 'root'@'localhost'         | def           | CREATE TABLESPACE       | YES          |
| 'hzshark'@'localhost'      | def           | USAGE                   | NO           |
| 'hzshark'@'10.155.34.210'  | def           | SELECT                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | INSERT                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | UPDATE                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | DELETE                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | DROP                    | NO           |
| 'hzshark'@'10.155.34.210'  | def           | RELOAD                  | NO           |
| 'hzshark'@'10.155.34.210'  | def           | SHUTDOWN                | NO           |
| 'hzshark'@'10.155.34.210'  | def           | PROCESS                 | NO           |
| 'hzshark'@'10.155.34.210'  | def           | FILE                    | NO           |
| 'hzshark'@'10.155.34.210'  | def           | REFERENCES              | NO           |
| 'hzshark'@'10.155.34.210'  | def           | INDEX                   | NO           |
| 'hzshark'@'10.155.34.210'  | def           | ALTER                   | NO           |
| 'hzshark'@'10.155.34.210'  | def           | SHOW DATABASES          | NO           |
| 'hzshark'@'10.155.34.210'  | def           | SUPER                   | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE TEMPORARY TABLES | NO           |
| 'hzshark'@'10.155.34.210'  | def           | LOCK TABLES             | NO           |
| 'hzshark'@'10.155.34.210'  | def           | EXECUTE                 | NO           |
| 'hzshark'@'10.155.34.210'  | def           | REPLICATION SLAVE       | NO           |
| 'hzshark'@'10.155.34.210'  | def           | REPLICATION CLIENT      | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE VIEW             | NO           |
| 'hzshark'@'10.155.34.210'  | def           | SHOW VIEW               | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE ROUTINE          | NO           |
| 'hzshark'@'10.155.34.210'  | def           | ALTER ROUTINE           | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE USER             | NO           |
| 'hzshark'@'10.155.34.210'  | def           | EVENT                   | NO           |
| 'hzshark'@'10.155.34.210'  | def           | TRIGGER                 | NO           |
| 'hzshark'@'10.155.34.210'  | def           | CREATE TABLESPACE       | NO           |
| 'testlink'@'10.155.40.231' | def           | USAGE                   | NO           |
| 'root'@'::1'               | def           | SELECT                  | YES          |
| 'root'@'::1'               | def           | INSERT                  | YES          |
| 'root'@'::1'               | def           | UPDATE                  | YES          |
| 'root'@'::1'               | def           | DELETE                  | YES          |
| 'root'@'::1'               | def           | CREATE                  | YES          |
| 'root'@'::1'               | def           | DROP                    | YES          |
| 'root'@'::1'               | def           | RELOAD                  | YES          |
| 'root'@'::1'               | def           | SHUTDOWN                | YES          |
| 'root'@'::1'               | def           | PROCESS                 | YES          |
| 'root'@'::1'               | def           | FILE                    | YES          |
| 'root'@'::1'               | def           | REFERENCES              | YES          |
| 'root'@'::1'               | def           | INDEX                   | YES          |
| 'root'@'::1'               | def           | ALTER                   | YES          |
| 'root'@'::1'               | def           | SHOW DATABASES          | YES          |
| 'root'@'::1'               | def           | SUPER                   | YES          |
| 'root'@'::1'               | def           | CREATE TEMPORARY TABLES | YES          |
| 'root'@'::1'               | def           | LOCK TABLES             | YES          |
| 'root'@'::1'               | def           | EXECUTE                 | YES          |
| 'root'@'::1'               | def           | REPLICATION SLAVE       | YES          |
| 'root'@'::1'               | def           | REPLICATION CLIENT      | YES          |
| 'root'@'::1'               | def           | CREATE VIEW             | YES          |
| 'root'@'::1'               | def           | SHOW VIEW               | YES          |
| 'root'@'::1'               | def           | CREATE ROUTINE          | YES          |
| 'root'@'::1'               | def           | ALTER ROUTINE           | YES          |
| 'root'@'::1'               | def           | CREATE USER             | YES          |
| 'root'@'::1'               | def           | EVENT                   | YES          |
| 'root'@'::1'               | def           | TRIGGER                 | YES          |
| 'root'@'::1'               | def           | CREATE TABLESPACE       | YES          |
| 'root'@'127.0.0.1'         | def           | SELECT                  | YES          |
| 'root'@'127.0.0.1'         | def           | INSERT                  | YES          |
| 'root'@'127.0.0.1'         | def           | UPDATE                  | YES          |
| 'root'@'127.0.0.1'         | def           | DELETE                  | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE                  | YES          |
| 'root'@'127.0.0.1'         | def           | DROP                    | YES          |
| 'root'@'127.0.0.1'         | def           | RELOAD                  | YES          |
| 'root'@'127.0.0.1'         | def           | SHUTDOWN                | YES          |
| 'root'@'127.0.0.1'         | def           | PROCESS                 | YES          |
| 'root'@'127.0.0.1'         | def           | FILE                    | YES          |
| 'root'@'127.0.0.1'         | def           | REFERENCES              | YES          |
| 'root'@'127.0.0.1'         | def           | INDEX                   | YES          |
| 'root'@'127.0.0.1'         | def           | ALTER                   | YES          |
| 'root'@'127.0.0.1'         | def           | SHOW DATABASES          | YES          |
| 'root'@'127.0.0.1'         | def           | SUPER                   | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE TEMPORARY TABLES | YES          |
| 'root'@'127.0.0.1'         | def           | LOCK TABLES             | YES          |
| 'root'@'127.0.0.1'         | def           | EXECUTE                 | YES          |
| 'root'@'127.0.0.1'         | def           | REPLICATION SLAVE       | YES          |
| 'root'@'127.0.0.1'         | def           | REPLICATION CLIENT      | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE VIEW             | YES          |
| 'root'@'127.0.0.1'         | def           | SHOW VIEW               | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE ROUTINE          | YES          |
| 'root'@'127.0.0.1'         | def           | ALTER ROUTINE           | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE USER             | YES          |
| 'root'@'127.0.0.1'         | def           | EVENT                   | YES          |
| 'root'@'127.0.0.1'         | def           | TRIGGER                 | YES          |
| 'root'@'127.0.0.1'         | def           | CREATE TABLESPACE       | YES          |
| ''@'localhost'             | def           | USAGE                   | NO           |
| 'hzshark'@'10.155.40.%'    | def           | SELECT                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | INSERT                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | UPDATE                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | DELETE                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | DROP                    | NO           |
| 'hzshark'@'10.155.40.%'    | def           | RELOAD                  | NO           |
| 'hzshark'@'10.155.40.%'    | def           | SHUTDOWN                | NO           |
| 'hzshark'@'10.155.40.%'    | def           | PROCESS                 | NO           |
| 'hzshark'@'10.155.40.%'    | def           | FILE                    | NO           |
| 'hzshark'@'10.155.40.%'    | def           | REFERENCES              | NO           |
| 'hzshark'@'10.155.40.%'    | def           | INDEX                   | NO           |
| 'hzshark'@'10.155.40.%'    | def           | ALTER                   | NO           |
| 'hzshark'@'10.155.40.%'    | def           | SHOW DATABASES          | NO           |
| 'hzshark'@'10.155.40.%'    | def           | SUPER                   | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE TEMPORARY TABLES | NO           |
| 'hzshark'@'10.155.40.%'    | def           | LOCK TABLES             | NO           |
| 'hzshark'@'10.155.40.%'    | def           | EXECUTE                 | NO           |
| 'hzshark'@'10.155.40.%'    | def           | REPLICATION SLAVE       | NO           |
| 'hzshark'@'10.155.40.%'    | def           | REPLICATION CLIENT      | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE VIEW             | NO           |
| 'hzshark'@'10.155.40.%'    | def           | SHOW VIEW               | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE ROUTINE          | NO           |
| 'hzshark'@'10.155.40.%'    | def           | ALTER ROUTINE           | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE USER             | NO           |
| 'hzshark'@'10.155.40.%'    | def           | EVENT                   | NO           |
| 'hzshark'@'10.155.40.%'    | def           | TRIGGER                 | NO           |
| 'hzshark'@'10.155.40.%'    | def           | CREATE TABLESPACE       | NO           |
| 'hzshark'@'10.155.30.%'    | def           | SELECT                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | INSERT                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | UPDATE                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | DELETE                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | DROP                    | NO           |
| 'hzshark'@'10.155.30.%'    | def           | RELOAD                  | NO           |
| 'hzshark'@'10.155.30.%'    | def           | SHUTDOWN                | NO           |
| 'hzshark'@'10.155.30.%'    | def           | PROCESS                 | NO           |
| 'hzshark'@'10.155.30.%'    | def           | FILE                    | NO           |
| 'hzshark'@'10.155.30.%'    | def           | REFERENCES              | NO           |
| 'hzshark'@'10.155.30.%'    | def           | INDEX                   | NO           |
| 'hzshark'@'10.155.30.%'    | def           | ALTER                   | NO           |
| 'hzshark'@'10.155.30.%'    | def           | SHOW DATABASES          | NO           |
| 'hzshark'@'10.155.30.%'    | def           | SUPER                   | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE TEMPORARY TABLES | NO           |
| 'hzshark'@'10.155.30.%'    | def           | LOCK TABLES             | NO           |
| 'hzshark'@'10.155.30.%'    | def           | EXECUTE                 | NO           |
| 'hzshark'@'10.155.30.%'    | def           | REPLICATION SLAVE       | NO           |
| 'hzshark'@'10.155.30.%'    | def           | REPLICATION CLIENT      | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE VIEW             | NO           |
| 'hzshark'@'10.155.30.%'    | def           | SHOW VIEW               | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE ROUTINE          | NO           |
| 'hzshark'@'10.155.30.%'    | def           | ALTER ROUTINE           | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE USER             | NO           |
| 'hzshark'@'10.155.30.%'    | def           | EVENT                   | NO           |
| 'hzshark'@'10.155.30.%'    | def           | TRIGGER                 | NO           |
| 'hzshark'@'10.155.30.%'    | def           | CREATE TABLESPACE       | NO           |
| 'hzshark'@'%'              | def           | USAGE                   | NO           |
+----------------------------+---------------+-------------------------+--------------+
172 rows in set (0.00 sec)


mysql> 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

youcharming

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值