MySQL: What happens to stored procedures, functions and triggers when dumping complete database with mysqldump

mysql

Solution

mysqldump will backup by default all the triggers but NOT the stored procedures/functions. There are 2 mysqldump parameters that control this behavior:

–routines (procedures and functions) – false by default
–triggers – true by default

http://www.ducea.com/2007/07/25/dumping-mysql-stored-procedures-functions-and-triggers/

Problem

I have been using `mysqldump` for backup purposes. We have a new database here with lots of functions, procedures and triggers. What happens to these functions or procedures or triggers if I take a complete database backup? Will these triggers, functions and procedures also be dumped? Are there any precautions need to be taken in this kind of scenario?

Original source