Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SQL Error Installing Sample Data
 
jcecommerce
Jr. Member
 
Total Posts:  2
Joined:  2011-10-26
 

Hello,

I am getting the following error trying to import the new 1.6.1 sample data sql file. I’ve tried both PHPMyAdmin and through the MySQL command line and received the same error. Any ideas?

Error

SQL query:

CREATE TABLE `tag` ( `tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘Tag Id’, `name` varchar(255) DEFAULT NULL COMMENT ‘Name’, `status` smallint(6) NOT NULL DEFAULT ‘0’ COMMENT ‘Status’, `first_customer_id` int(10) unsigned DEFAULT NULL COMMENT ‘First Customer Id’, `first_store_id` smallint(5) unsigned DEFAULT NULL COMMENT ‘First Store Id’, PRIMARY KEY (`tag_id`) USING BTREE, KEY `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`first_customer_id`), KEY `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` (`first_store_id`), CONSTRAINT `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`first_store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`first_customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT=’[...]

MySQL said: Documentation
#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_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`first’ at line 7

 
Magento Community Magento Community
Magento Community
Magento Community
 
jcecommerce
Jr. Member
 
Total Posts:  2
Joined:  2011-10-26
 

Upgrading to MySQL 5.1 from MySQL 5.0 solved this issue for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Festen
Jr. Member
 
Total Posts:  5
Joined:  2011-10-22
 

Guys I have the same problem here, but please explain, Magento says you need at least mySQL 4.x.x or something, I\’m running 5+, so this shouldn’t be a problem in my opinion.

Anyone any tips for people on a hosted webserver that cannot upgrade mySQL.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sprinnet
Sr. Member
 
Avatar
Total Posts:  140
Joined:  2009-01-12
Prague, Czech Republic
 

If you wish to use MySQL 5.0, you have to download samples for Magento 1.2 and compare CREATE TABLE ‘tag’ with samples for Magento 1.6.

p.s.: I’ve resolved the problem by upgrade MySQL to 5.1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Template fans
Guru
 
Total Posts:  446
Joined:  2009-11-02
 

If you would like to use the sample data, you will need to install Sample Data before installing Magento.

The archive file is available in (.zip) (9.9 MB), .tar.gz (9.8 MB), and .tar.bz2 (9.7 MB) formats to download (the files contain exactly the same content inside and are provided in different formats just for your convenience).

Each archive contains a SQL script that should be applied on a clean database with your database management tool (phpMyAdmin or whatever you use), and a ‘media’ folder with sample product images that you should copy to your Magento media folder.

You should then run the regular installation process as you would for a complete package. Please make sure that you have Magento version 1.6.1.0 or newer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Festen
Jr. Member
 
Total Posts:  5
Joined:  2011-10-22
 

Hi all I have asked my hosting provider to upgraded to the newest supported version of mysql. They informed me that they would migrated my domain to a new server.

Currently (after Migration) that server should be on: MySQL 5.0.51a-24+lenny5-log (Debian).

However when I run: magento-check.php i get the following error.

I found out that due to the:

Warning: shell_exec() has been disabled for security reasons in /vhosts/proflexit.nl/httpdocs/magento/magento-check.php on line 28

The script cannot access the version information for MySQL, but I have manually checked it an it is a perfectly fit version so that shouldn’t be the problem.

Nevertheless I tried to install Sample Data again and ran into a failure on:

Fout

SQL-query:

CREATE TABLE `tag` ( `tag_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT ‘Tag Id’, `name` varchar(255) DEFAULT NULL COMMENT ‘Name’, `status` smallint(6) NOT NULL DEFAULT ‘0’ COMMENT ‘Status’, `first_customer_id` int(10) unsigned DEFAULT NULL COMMENT ‘First Customer Id’, `first_store_id` smallint(5) unsigned DEFAULT NULL COMMENT ‘First Store Id’, PRIMARY KEY (`tag_id`) USING BTREE, KEY `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`first_customer_id`), KEY `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` (`first_store_id`), CONSTRAINT `FK_TAG_FIRST_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`first_store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT `FK_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`first_customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT=’[...]

MySQL retourneerde: Documentatie
#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_TAG_FIRST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` (`first’ at line 7
[ Terug ]

Anyone any tips

 
Magento Community Magento Community
Magento Community
Magento Community
 
Festen
Jr. Member
 
Total Posts:  5
Joined:  2011-10-22
 

solved this problem by changing:

PRIMARY KEY (`tag_id`) USING BTREE,
changed into
PRIMARY KEY USING BTREE (`tag_id`),

PRIMARY KEY (`tag_relation_id`) USING BTREE ,
changed into
PRIMARY KEY USING BTREE (`tag_relation_id`),

 
Magento Community Magento Community
Magento Community
Magento Community
 
OlliS
Jr. Member
 
Total Posts:  1
Joined:  2011-11-10
 

Thanks for the good tip Festen!!...problem solved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wjohan
Member
 
Avatar
Total Posts:  46
Joined:  2011-03-08
Monnickendam
 

Yes this solved it for me as well..

 
Magento Community Magento Community
Magento Community
Magento Community
 
pelingier
Jr. Member
 
Total Posts:  2
Joined:  2011-05-15
 
Festen - 06 November 2011 10:59 AM

solved this problem by changing:

PRIMARY KEY (`tag_id`) USING BTREE,
changed into
PRIMARY KEY USING BTREE (`tag_id`),

PRIMARY KEY (`tag_relation_id`) USING BTREE ,
changed into
PRIMARY KEY USING BTREE (`tag_relation_id`),

Thx

 
Magento Community Magento Community
Magento Community
Magento Community
 
Frederik Krautwald
Member
 
Avatar
Total Posts:  58
Joined:  2007-09-25
Reykjavík, Iceland
 
Festen - 06 November 2011 10:59 AM

solved this problem by changing:

PRIMARY KEY (`tag_id`) USING BTREE,
changed into
PRIMARY KEY USING BTREE (`tag_id`),

PRIMARY KEY (`tag_relation_id`) USING BTREE ,
changed into
PRIMARY KEY USING BTREE (`tag_relation_id`),

Brilliant!  cool smile Solves it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
shenxf
Jr. Member
 
Total Posts:  2
Joined:  2012-03-13
 

yes,it be resolved.thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
vjtemplates
Guru
 
Avatar
Total Posts:  408
Joined:  2010-12-15
Washington, USA
 

I’d say better to setup your own categories and products rather than using sample data. That way you can learn how to setup categories and products in Magento. After all, you will need to do that though.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iconrayamajhi
Jr. Member
 
Total Posts:  3
Joined:  2011-03-22
 

This solve me also thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
zebulon
Jr. Member
 
Total Posts:  26
Joined:  2008-07-28
 

Yup - for me, too!
So thanks a lot!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top