19.1. Stored Routines and the Grant Tables
Stored routines require the
proc table in the
mysql database. This table is created during
the MySQL 5.1 installation procedure. If you are
upgrading to MySQL 5.1 from an earlier version, be
sure to update your grant tables to make sure that the
proc table exists. See
Section 5.5.2, “mysql_upgrade — Check Tables for MySQL Upgrade”.
The server manipulates the
mysql.proc table in
response to statements that create, alter, or drop stored
routines. It is not supported that the server will notice manual
manipulation of this table.
The MySQL grant system takes stored routines into account as
CREATE ROUTINE privilege is needed to
create stored routines.
ALTER ROUTINE privilege is needed to
alter or drop stored routines. This privilege is granted
automatically to the creator of a routine.
EXECUTE privilege is required to
execute stored routines. However, this privilege is granted
automatically to the creator of a routine. Also, the default
SQL SECURITY characteristic for a routine
DEFINER, which enables users who have
access to the database with which the routine is associated to
execute the routine.