views:

23

answers:

1

The MySQL Manual says that I can print the code used to define a stored procedure using SHOW CREATE PROCEDURE, but apparently that only works if you a) have select permissions on the mysql.proc table, or b) own the procedure.

The database in question was maintained by a co-worker who's moved on, so I should be the owner of all the stuff that used to be "his". The only problem is, I can't seem to find any documentation on how to change the owner in the database -- most of the Google hits point to how to change file ownership (which of course is a basic, generic sysadmin task).

One place pointed to sp_changeobjectownership but it looks like they might have accidentally been trying to use a MS SQL Server sproc instead. Is there any simple way to say "change all the objects in [database] owned by [user1] to be owned by [user2]"? Failing that, I'll take a command to change the owner of a single object...

+1  A: 

There is a column definer in mysql.proc table and a row for each stored procedure or function that can be updated to your login.

laurent-rpnet