当前位置:网站首页>MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table

MySQL uses the view to report an error, explain/show can not be issued; lacking privileges for underlying table

2022-07-04 00:50:00 CSDN Q & A

There is an employee list staff

Add view , Read only 2 A field
CREATE VIEW staff_view AS SELECT name,mobile FROM staff;

Add view permissions
GRANT select, SHOW VIEW ON staff_view TO 'test'@'%' IDENTIFIED BY 'test';

When querying the view , Wrong presentation EXPLAIN/SHOW can not be issued; lacking privileges for underlying table

It's said on the Internet because I didn't give staff Table increase select jurisdiction

But isn't one of the functions of view for security , If staff View permission is added to the table , Then just look up the table directly ?staff_view It didn't play its due role ?

原网站

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202206270853042407.html