Issues to be aware of when using the mysqldump tool
- 2020-05-07 20:36:01
- OfStack
The description is as follows:
There is a problem when exporting Trigger with mysqldump. Post it so you don't make any mistakes.
When performing the following operations:
The exported result contains Trigger.
The exported result still contains Trigger.
Error 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'
Solutions:
By default, tiggers value is true when no parameters are taken, so we modify its value to be false and add a switch to mysqldump: --triggers=false.
There is a problem when exporting Trigger with mysqldump. Post it so you don't make any mistakes.
When performing the following operations:
[root@ytt ~]# /usr/local/mysql/bin/mysqldump -S /tmp/mysql1.sock test > test.sql
The exported result contains Trigger.
[root@ytt ~]# /usr/local/mysql/bin/mysqldump -S /tmp/mysql1.sock -Rdtn test > test_sp.sql
The exported result still contains Trigger.
Error 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'
Solutions:
By default, tiggers value is true when no parameters are taken, so we modify its value to be false and add a switch to mysqldump: --triggers=false.