MySQL – When Was the Stored Procedure Created and Altered

mysql-5.7stored-procedures

I am about to update a MySQL server in operation with the changes made on a development server.
I want to be sure that I don't miss any changes.
Are there any logs telling things like when the stored procedure was created and altered om a MySQL server?
I read the documentation about server logs but it does not seem to cover this issue.

Best Answer

The easiest way is to check information_schema.routines metadata table.

You can get the basic list of all procedures and functions with:

SELECT routine_name, routine_type, created, last_altered
  FROM information_schema.routines

You can include some other fields as needed - the exhaustive list is in the MySQL 5.7 reference - 24.21 The INFORMATION_SCHEMA ROUTINES Table

Information schema contains tables that contain the "database metadata" and describe the database's entities: tables, indexes, procedures and many others. Every relational database has some kind "database catalog" as per Rule 4 of Codd's 12 rules for RDBMSs.

So whenever you are needing some info about database objects on any RDBMS product you can always check the manual for the specifications of the "database dictionary", "database catalog" or similar.

Check here for other of the INFORMATION SCHEMA tables on Mysql 5.7.