why need select privileges on *.* to use view?

Posted by profy on Server Fault See other posts from Server Fault or by profy
Published on 2012-06-29T15:11:31Z Indexed on 2012/06/29 15:17 UTC
Read the original article Hit count: 211

Filed under:

I have a problem using view with MySQL server 5.0 (5.0.92)

I cannot use view with a user granted like that :

GRANT USAGE ON *.* TO 'testuser'@'' IDENTIFIED BY PASSWORD '**********';
GRANT ALL PRIVILEGES ON `testuser`.* TO 'testuser'@'';

I can create view, but when I try to select in, I have this messages :

ERROR 1356 (HY000): View 'testuser.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

I need to "GRANT SELECT ON . TO 'testuser'@''" to make select working on the view.

Why ?

Do you know a solution to use VIEW's without the select privileges on . ?

Thanks a lots for your answers.

© Server Fault or respective owner

Related posts about mysql