how to export stored procedure from mysql code example
Example: how to export only procedures mysql
# specific database
mysqldump -h the_host -u the_user -p -n -d -t --routines --triggers the_database_name > the_routines.sql
# all databases
mysqldump -h the_host -u the_user -p -n -d -t --routines --triggers --all-databases > the_routines.sql