By default stored procedures and functions or not generated by mysqldump
, you will need to add the parameter --routines
(or -R
):
mysqldump -u username -p -R db_name > dump.sql
When using [--routines](<https://dev.mysql.com/doc/refman/5.6/en/mysqldump.html#option_mysqldump_routines>)
the creation and change time stamps are not maintained, instead you should dump and reload the contents of mysql.proc
.