When I try to select function
SELECT myDatabase.myFunction('');
I get error that
ERROR 1142 (42000): SELECT command denied to user 'myUser'@'localhost' for table 'myTable'
Although user has all permissions
mysql> show grants for myUser;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for myUser@% |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'myUser'@'%' IDENTIFIED BY PASSWORD '' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `myDatabase`.* TO 'myUser'@'%'|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
and I can also access myTable directly without any problems.
Any help will be appreciated.
P.S. All function, table, database, user names are ok in case I have misspelled something in this post.