[MySQL] mysql | 5.6sql file import 5.7 error record

1. Description

        1. The local database wants to be synchronized to the cloud database

        2. Local database 5.6

        3. Cloud database 5.7

        4. Export the full amount of sql files, and directly execute the error report, go shi~

2. Problem record

1. The default value of timestamp needs to be adjusted

1) 5.6 Export

`update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',

2) 5.7 adjusted to

`update_time` timestamp NOT NULL DEFAULT now() COMMENT '更新时间',

Explanation 1: Date of 5.6, '0000-00-00...' is illegal

~~

2. Delete the foreign key

1) 5.6 foreign key export

The foreign key is garbled

 

2) processing

Note 1: For single table processing, just delete the foreign key

Note 2: Involves table job table, dictionary table

~~

Guess you like

Origin blog.csdn.net/myloverisxin/article/details/130113575