Note when trigger exists in mysqldump

Source: Internet
Author: User

In mysqldump, when a trigger is used to convert a myisam table to innodb, the schema is first exported and then only data is exported. For example: www.2cto.com mysqldump -- no-data databasename> schema. SQL output data: mysqldump -- no-create-info databasename> data. CREATE a DATABASE during SQL import, such as test mysql> create database test; Query OK, 1 row affected (0.00 sec) $ mysql test <schema. SQL $ mysql test <data. when SQL www.2cto.com is created, if a trigger has been created in the previous database, an ERROR is reported, as follows: ERROR 1235 (42000) at line 86: this version of MySQL doesn't yet support 'Multiple triggers ..................... view the schema. SQL, the -- no-create-info parameter contains the trigger definition. the triggers parameter in mysqldump is described as: -- triggers Include triggers for each dumped table in the output. this option is enabled by default; disable it with -- skip-triggers. therefore, if a trigger is used but only data is exported, you can do this: mysqldump -- no-create-info -- skip-triggers databasename> data. SQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.