I am trying to give a user permission to run a stored procedure at the stored procedure level on a MySQL Database rather than allowing a user to execute any stored procedure in the database. I was trying to execute the following code:
GRANT EXECUTE ON myDB.spName TO 'TestUser'@'localhost';
But i keep getting the following error: Illegal GRANT/REVOKE command, please consult the manual to see which privileges can be used.
I tried changing it to the following:
GRANT EXECUTE ON PROCEDURE myDB.spName TO 'TestUser'@'localhost';
And i get a different error stating:
Cant find any matching rows in the user table.
I am confused as to where I am going wrong?
Also on the MySQL Workbench I can not seem to see any way to grant permissions at the stored procedure level via the GUI. Is this correct or am I missing something?
Thanks in advance.