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