Connecting Tech Pros Worldwide Help | Site Map

Locking a stored procedure!

Member
 
Join Date: Feb 2009
Posts: 57
#1: Jun 19 '09
Hi,

Can i lock a stored procedure in mysql so that others can only be able to view it, but they will not be able to alter it?

Thanks,
Lauren
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,733
#2: Jun 19 '09

re: Locking a stored procedure!


Hi.

You (the database administrator) can decide which privileges each user has.

A user must have the CREATE_ROUTINE privilege to create procedures and the ALTER_ROUTINE privilege to be able to change a procedure.
However, the EXECUTE privilege is all that is required to call a procedure.

So, a user without the first two but with the third would only be able to execute procedures but not alter them.

To grant and revoke privileges, see:
12.5.1.3. GRANT Syntax and 12.5.1.5. REVOKE Syntax.
Reply