in phpmyadmin while you export the database to select and then check the add procedures/events/triggers
or
use the following command
mysqldump -u root -p db_name --routines --events --triggers > file.sql
for more information visit the link
source share