Magento SQL Import :: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE,

Article ID #1108
Revision: 1.0
Last update: 2011-10-11

The following error message is reported on attemtp to import Magento database SQL dump:

 

MySQL said: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE,
  KEY ´FK_ATTRIBUTE_VARCHAR_ENTITY´ (´entity_id´),
  KEY ´FK_CATALO' at line 9

 

The error is caused by difference in SQL server versions. To avoid this issue there are the following possibilities:

  • if the database dump was creared via phpMyAdmin: enable Compatibility mode checkbox and select MySQL 4.0 compatibility
  • if the database dump was created with mysqldump utility: add --compatible=mysql40 option to the command-line.

 

If the dump cannot be recreated due to some reason, to correct current dump file the following line:

UNIQUE KEY ´IDX_BASE´ (´entity_type_id´,´entity_id´,´attribute_id´,´store_id´) USING BTREE,


should be replaced with the following one:

UNIQUE KEY ´IDX_BASE´ USING BTREE (´entity_type_id´,´entity_id´,´attribute_id´,´store_id´),

 

After that the database dump should be imported correctly.

Did this article help you solve your issue?


Average rating: 4.43 (14 votes)

completely useless 1 2 3 4 5 most valuable

Tags: