Thursday 15 November 2018

How to create Database Dump with routine, triggers and procedures using MySQLDump

Mostly, MySQLDump is used for taking backup of MySQL data backups. MySQL provide a mysqldump scripts with the multiple options to take dump of MySQL Databases. MySQLDump will take backup by default of all the triggers but not the stored procedures and functions.
Create a database dump with routine, triggers and procedures: Triggers option is by default enabled in MySQLdump so add the routine option while taking dump
[root@linuxcnf ~]# mysqldump –u root –pmypassword --routines test_db > test_db_dump.sql
[root@linuxcnf ~]# 

Database test_db backup routine, triggers and procedures is done. Verify the same once!!!

No comments:

Post a Comment