mysql> show grants for v_ro@'%' ;
+--------------------------------------+
| Grants for v_ro@% |
+--------------------------------------+
| GRANT SHOW VIEW ON *.* TO 'v_ro'@'%' |
+--------------------------------------+
1 row in set (0.00 sec)
报错如下
mysql> show grants;
+--------------------------------------+
| Grants for User |
+--------------------------------------+
| GRANT SHOW VIEW ON *.* TO 'v_ro'@'%' |
+--------------------------------------+
1 row in set (0.00 sec)
mysql> select * from view_XXX ;
ERROR 1142 (42000): SELECT command denied to user 'v_ro'@'%' for table 'view_XXX'
mysql>