MySQL5.6 Error analysis when importing data

Source: Internet
Author: User

A strange error occurred today when importing mysqldump exported data?


ERROR 1064 (42000) at line 13327:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1


Open 13327 lines of the file and find this is a trigger SQL statement with/*! * * Do not look carefully to create triggers failure

But when it's done by hand, it does:


mysql>/*!50003 create*//*!50017 definer= ' appuser ' @ '% ' * */*!50003 TRIGGER ' b_admin_user_update ' after update on ' B_ad Min_user ' For each ROW

INSERT into Delta_b_admin_user (' user_id ', ' username ', ' password ', ' salt ', ' real_name ', ' cell_phone ', ' qq ', ' pho Ne ', ' email ', ' wangwang ', ' created_time ', ' last_login_time ', ' last_login_ip ', ' user_group_id ', ' flag ', ' parent_id ', ' QR _code ')

Values

(New.user_id,new.username, New.password, New.salt, New.real_name, New.cell_phone, New.qq, NEW.phone, NEW.email, New.wangwang, New.created_time, New.last_login_time, New.last_login_ip, new.user_group_id, NEW.flag, NEW.parent_id, New.qr_code); */;;

Query OK, 0 rows affected (0.01 sec)


Error 1064 (42000): You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1


Is this a successful implementation? But I still reported a mistake: (


After the search, found that MySQL in the import of a parameter is to ignore the error continue to execute after the SQL to know that the entire file execution completed


--force This parameter, plus the parameter is imported again


/usr/local/mysql-5.6/bin/mysql-uroot-p ' Pass '--force </usr/local/mysql-5.6/all.sql

Warning:using a password on the command line interface can is insecure.

ERROR 1064 (42000) at line 13327:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 13345:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 15612:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 15630:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 21753:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 21771:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1

ERROR 1064 (42000) at line 28734:you has an error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' * * ' at line 1


Well, it really didn't quit.

And then we did a test.

When exporting the data, do not export the trigger, then you need to add the parameter--skip-triggers


No more error when you import it.

So is the mysql-5.6 version of the relationship?

Pending research




This article is from "Shadow Knight" blog, please make sure to keep this source http://andylhz2009.blog.51cto.com/728703/1752895

MySQL5.6 Error analysis when importing data

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.