When dumping a MySQL database, by default, stored procedures and functions will not be backed up. If you want to backup stored procedures as well as the structure and data you can specify the –routines option on mysqldump.
mysqldump -u -p –routines > backup.sql
If you only need to dump the stored procedures, for example the database is big and you already have an export of everything bar the routines you can use the following command:
mysqldump -u -p –routines –no-create-info –no-data –no-create-db –skip-opt > procedures_backup.sql
The above command tells mysqldump not to include the table creation SQL, the insert SQL, the database creation SQL and the database options, if any.



Pingback: Tweets that mention How to dump MySQL stored procedures | srcnix's obsessions -- Topsy.com
Pingback: Eufeion Tutorial 5 - Climbing Bass | Tutorialicious.info