查看用户权限
show grants for 你的用户
比如:
show grants for root@’localhost’;
mysql> use mysql;
Database changed
mysql> select user,host from user;
+———+———————–+
| user | host |
+———+———————–+
| root | 127.0.0.1 |
| | localhost |
| root | localhost |
| | localhost.localdomain |
| root | localhost.localdomain |
+———+———————–+
7 rows in set (0.00 sec)
mysql> show grants for root@’localhost’;
+———————————————————————+
| Grants for root@localhost |
+———————————————————————+
| GRANT ALL PRIVILEGES ON *.* TO ‘root’@'localhost’ WITH GRANT OPTION |
+———————————————