我有一对通过VIP进行通信的MySQL对。我想从任何IP验证所有用户(包括root用户)的权限。当我尝试查看root的所有授权时,我得到了这个:
mysql> show grants for root;
ERROR 1141 (42000): There is no such grant defined for user 'root' on host '%'
但是还有其他的root授权:
mysql> show grants for 'root'@'localhost';
+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `*.*`.* TO 'root'@'localhost' |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
如何查看用户(所有主机和数据库)的所有授权?
答案 0 :(得分:9)
您可以使用:
$InputObject