mysql show grants查看权限

时间:2024-11-09 07:55:51

查看数据库中所有用户
mysql>SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM ;
 +---------------------------------------+
 | query                                 |
 +---------------------------------------+
 | User:;                |
| User: ;              |
| User: ;                      |
| User: ;                     |
| User: ;                    |
| User: ;                   |
| User: ;             |
| User: ;           |
| User: ;       |
| User: ;  |
| User: ;       |
| User: ;                 |
| User: ;            |
| User: ;        |
| User: ;              |
| User: ;          |
| User: ;         |
| User: ;             |
| User: ;           |
| User: ;     |
| User: ; |
+---------------------------------------+
 21 rows in set (0.01 sec)