How to use mysqldump to export a Trigger
Description:
When using mysqldump to export a Trigger, you may encounter a problem and paste it to avoid mistakes.
When you perform the following operations:
[Root @ ytt ~] #/Usr/local/mysql/bin/mysqldump-S/tmp/mysql1.sock test> test. SQL
The exported result contains the Trigger.
[Root @ ytt ~] #/Usr/local/mysql/bin/mysqldump-S/tmp/mysql1.sock-Rdtn test> test_sp. SQL
The exported result still contains the Trigger.
An error occurred while importing:
[Root @ ytt ~] #/Usr/local/mysql/bin/mysql-S/tmp/mysql1.sock -- database test <test. SQL
[Root @ ytt ~] #/Usr/local/mysql/bin/mysql-S/tmp/mysql1.sock -- database test <sp. SQL
ERROR 1235 (42000) at line 26: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Solution:
If the tiggers value is true by default without any parameters, we can modify the value to false and add the switch -- triggers = false to mysqldump.