How can I grant somebody to see the structure of mysql routines? The following command can be used to show the structure of routines:
show create function FUNCTION_NAME
or
show create procedure PROCEDURE_NAME
but It should be run by the user with grant all
permission. I don't want to give grant all
to the user. What is the exact grant I need or what is the alternative solutions?
from the manual
To use either statement, you must be the user named in the routine DEFINER clause or have SELECT access to the mysql.proc table.
So granting SELECT
to the mysql.proc
table should be sufficient.