MYSQL – Mysqldump triggers only

Mysqldump triggers only

I – What are MySQL triggers ?

The MySQL trigger is a database object that is associated with a table.

It will be activated when a defined action is executed for the table (when you run the following MySQL statements on the table : INSERT, UPDATE, DELETE ).

Triggers can be invoke before or after this event. 

II – Mysqldump TRIGGERS only

If you forgot to save triggers and routines after migrate one database, you can dump and import triggers and routines without import all data in database.

Mysqldump dump triggers by defaults (--triggers)
 root@mysql-server:~# mysqldump --routines --triggers --no-create-info --no-data --no-create-db --skip-opt dbname 

That’s all for this post !

Sources :

Man Mysqldump : https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

florian

Hi, I'm Florian and I'm 32 years old. I have discover IT at 17, and i had my first internet connection at 23. So i'm not going to say that i was very precocious in this domain... PS : I 'm French, so please, be lenient with my english ;)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.