mysql show grants查看权限

来源:互联网 时间:1970-01-01


常用的来查看mysql用户权限命令的一些方法总结,在mysql中查看用户权限命令是show grants for了,有需要了解的朋友可参考
show grants for 你的用户;
 show grants for [email protected]'localhost';
show grants for [email protected];
(www.111cn.net) show create database dbname;  这个可以看到创建数据库时用到的一些参数。
show create table tickets;    可以看到创建表时用到的一些参数


查看数据库中所有用户
mysql>SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
 +---------------------------------------+
 | 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)

 



相关阅读:
Top