There are two sets of permissions for stored functions, | |
| |
To create a function in a database, the user must have the CREATE ROUTINE privilege. | |
To use a function, the caller must have the EXECUTE privilege for the particular database. | |
To change an existing function, the user must have the ALTER ROUTINE privilege. | |
Permissions can be granted globally in the mysql.user table. | |
Permissions can also be granted at the database level in the mysql.db table. | |
Permissions can be granted for a specific routine in the mysql.procs_priv table. |