As a root user I did this:
GRANT DELETE, SELECT, INSERT, UPDATE, EXECUTE ON dbName.* TO
'user'@'localhost' IDENTIFIED BY 'apassword';
In 'dbName' I created a procedure 'proc_name' with definer set to 'user'@'localhost'.
Similarly I create a function 'func_name' with definer set to 'user'@'localhost'.
Now the issue is, I'm able to do select func_name();
but I'm not able to call the procedure proc_name()
When i did :
call proc_name(), I get the below error:
ERROR 1044 (42000): Access denied for user 'user'@'localhost' to database 'dbName'
Any pointers to the solution would be appreciated.
SECURITY DEFINER
? orSECURITY INVOKER
? – Rick James Mar 27 '15 at 5:52SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_NAME = 'proc_name';
– Rick James Mar 27 '15 at 5:54DELETE, SELECT, INSERT, UPDATE
? – Rick James Mar 27 '15 at 6:43