Using tree Import failed due to version issue in MySQL

Source: Internet
Author: User

Some time ago because I want to set up a work environment at home, so the SQL Test library data into their own computer, but with Navicat import, set the ' Encounter error continue ', and then run the SQL statement after the end of query import results, only 3 tables imported successfully.

Then from the Import window query problems, only a few tables imported successfully, and then the other is the XX table does not exist, and then found in the SQL file to build the table statement, put in the Navicat run window execution, found the problem is because


DROP TABLE IF EXISTS ' agency_template ';

CREATE TABLE ' Agency_template ' (
' id ' int (ten) unsigned not NULL auto_increment,
' UID ' int (ten) not NULL COMMENT ' agent id ',
' template_id ' int (ten) not NULL COMMENT ' used template number ',
' logo_filename ' varchar (not NULL),
' logo_addr ' varchar (+) not NULL DEFAULT ' COMMENT ' logo image address ',
' Alias_url ' varchar (CHARACTER) SET latin1 not NULL COMMENT ' custom URL ',
' Create_at ' int (one) is not NULL,
' Last_update_at ' int (one) is not NULL,
PRIMARY KEY (' id '),
UNIQUE KEY ' uid ' (' uid ') USING HASH,
KEY ' Alias_url ' (' Alias_url ') USING BTREE
) Engine=innodb auto_increment=187 DEFAULT Charset=utf8;

These are the two sentences:

UNIQUE KEY ' uid ' (' uid ') USING HASH,
KEY ' Alias_url ' (' Alias_url ') USING BTREE

Need to be modified to:

UNIQUE KEY ' uid ' USING HASH (' uid '),
KEY ' Alias_url ' USING BTREE (' Alias_url ')

In the company can be imported successfully, but in their own computer can not, just because of the MySQL version of the problem

(After: Since the export from Navicat is the entire database exported, so the SQL file is very large, There is 1.2G, and then write the program to decompose it into an enzyme 10000 line a file can be opened, in fact, there is absolutely no need, directly in the Navicat error box can see the error, but this also wrote the decomposition code, or useful, followed by the decomposition of the read program to write the using The hash and the location of the using tree are replaced.)

Using tree Import failed due to version issue in MySQL

Related Article

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.