What are the GRANTS needed for creating a Stored procedure?
Minimum Privileges required for a user to manage a stored procedure is CREATE ROUTINE, ALTER ROUTINE, and EXECUTE. Click here to learn more about permission matrix.
GRANT CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON db_name.table_name TO 'db_user'@'%';
EXECUTEpermission allows a user to execute an extensibility object. For example, having this permission for UDFs, UDAFs, and TVFs allows the user to run them in
SELECTqueries. Similarly, a user with
EXECUTEprivileges for a stored procedure can run the SP using the
CREATE ROUTINEprivilege allows a user to create an extensibility object (for example, a UDF, UDAF, TVF, or SP).
ALTER ROUTINEprivilege allows a user to replace or delete an extensibility object (for example, a UDF, UDAF, TVF, or SP).
Click here to learn about creating stored procedures in SingleStore.