"ANY Command denied for user" with View-over-View DDL via JDBC
I found that issuing the use database
statement before creating the view solved my problem. This seems to be related to a MySql bug report Bug #91122 "Failed to create a view containing a from subquery(No selected database)"
Basically if you try to create a view with the dbname.view_name
syntax then the error can appear. But if you issue the use database
statement beforehand, then everything is good.
I was having a very similar problem here. Given that you've already checked your grants, try explicitly setting the Database in use before creating the view.
My issue was due to create of VIEW where some of the columns were from another database which was missing on the target instance. It seems that if you do not have the right permissions also will come to this "meaningful" error "ANY command denied to user ...."