Call-back icon  Questions? Contact our sales team to a request a quote

Magento

eCommerce Software for Online Growth

Magento Forum

   
Sample Data 1.1.2 MySQL Error
 
Nijhof Internet Media
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-07-04
Netherlands
 

Bij het importeren van het sql bestand van de sample data 1.1.2 (magento_sample_data_for_1.1.2.sql) geeft mysql een foutmelding:

MySQL 5.0.58
phpMyAdmin 2.8.2.4

Fout
SQL
-query:

CREATE TABLE  `catalog_category_entity_datetime` (
 `
value_idINT11 NOT NULL AUTO_INCREMENT ,
 `
entity_type_idSMALLINTUNSIGNED NOT NULL DEFAULT  '0',
 `
attribute_idSMALLINTUNSIGNED NOT NULL DEFAULT  '0',
 `
store_idSMALLINTUNSIGNED NOT NULL DEFAULT  '0',
 `
entity_idINT10 UNSIGNED NOT NULL DEFAULT  '0',
 `
valueDATETIME NOT NULL DEFAULT  '0000-00-00 00:00:00',
PRIMARY KEY (  `value_id` ) ,
UNIQUE KEY  `IDX_BASE` (  `entity_type_id` ,  `entity_id` ,  `attribute_id` ,  `store_id` ) ,
KEY  `FK_ATTRIBUTE_DATETIME_ENTITY` (  `entity_id` ) ,
KEY  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_ATTRIBUTE` (  `attribute_id` ) ,
KEY  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE` (  `store_id` ) ,
CONSTRAINT  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_ATTRIBUTEFOREIGN KEY (  `attribute_id` ) REFERENCES  `eav_attribute` (  `attribute_id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
CONSTRAINT  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_ENTITYFOREIGN KEY (  `entity_id` ) REFERENCES  `catalog_category_entity` (  `entity_id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
CONSTRAINT  `FK_CATALOG_CATEGORY_ENTITY_DATETIME_STOREFOREIGN KEY (  `store_id` ) REFERENCES  `core_store` (  `store_id` ) ON DELETE CASCADE ON UPDATE CASCADE
ENGINE INNODB DEFAULT CHARSET utf8;


MySQL retourneerde

#1005 - Can't create table './db_magento/catalog_category_entity_datetime.frm' (errno: 150)

anderen met hetzelfde probleem cq. oplossing?

 Signature 

Nijhof Internet Media
Magento Hosting | Consultancy & Implementatie | Support
Streaming Media diensten | Zoekmachine Marketing | Webhosting

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nijhof Internet Media
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-07-04
Netherlands
 

SOLUTION for error #1005 on importing magento_sample_data_for_1.1.2.sql

MySQL 5.0.58
phpMyAdmin 2.8.2.4

This is a solution for the error:  #1005 - Can’t create table ‘./db_magento/catalog_category_entity_datetime.frm’ (errno: 150).
After research it seemed that the SET FOREIGN_KEYS_CHECKS=0 command was ignored.
This command is in the inline comments part of the sql file (top of the script):

/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;

The /* is the comment character and the ! tells mysql to execute the code within the comment. The number 40014 is a version number.
For some reason the code is not executed due to the inline comment.
Removing the version number did not solve it.
WORKING SOLUTION:
Remove the inline comment or replace line with:

SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;

SQL file will import successfully.

UPDATE:
Apart from solution above:
I also noticed that some tables are MyISAM, change everything to InnoDB

UPDATE2:
REMOVE ALL INLINE COMMENTS, PRESERVE THE CODE WITHIN THE COMMENTS
for some reason ALL code in inline comments is not executed causing an install failure of the shop/sample data

 Signature 

Nijhof Internet Media
Magento Hosting | Consultancy & Implementatie | Support
Streaming Media diensten | Zoekmachine Marketing | Webhosting

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gui
Sr. Member
 
Total Posts:  243
Joined:  2008-03-09
 

Top, dank je, voor het plaatsen van de gevonden oplossing; dat zouden meer mensen moeten doen!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ChristopherTate
Jr. Member
 
Total Posts:  13
Joined:  2008-04-20
 

Does anyone have a copy of this file without the comments?  I’ve tried removing the comments but there are a lot and it is still failing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nijhof Internet Media
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-07-04
Netherlands
 

Attached is an edited version of the 1.1.2 sample data sql file.
All inline comments are removed, code is preserved.

MySQL 5.0.58
phpMyAdmin 2.8.2.4

First, create database and import sql file.
Then install Magento (first upload sample data!).
I’ve installed Magento 1.1.3 (downloader), this is working with the sample data.
Don’t forget to clear the cache of Magento (System).

File Attachments
magento_sample_data_for_1.1.2_edited_nc.sql  (File Size: 1304KB - Downloads: 154)
 Signature 

Nijhof Internet Media
Magento Hosting | Consultancy & Implementatie | Support
Streaming Media diensten | Zoekmachine Marketing | Webhosting

 
Magento Community Magento Community
Magento Community
Magento Community
 
BerArt
Moderator
 
Avatar
Total Posts:  100
Joined:  2008-04-03
The Netherlands - Breda
 

Thx! Henrikus smile

 Signature 

.
Berrie Pelser - Ber|Art Visual Design & Hosting
PCI Compliant Secure Magento Hosting Services
Magento Moderator Dutch Forum

 
Magento Community Magento Community
Magento Community
Magento Community
 
laughingbuddha
Jr. Member
 
Total Posts:  7
Joined:  2007-10-05
 

Works a treat. Now why can’t they have this as standard smile

One very embarrassing meeting/training session with a client, and 4 hours later and i find this fix.

Works a treat, your a star. Cheers smile

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
sourcez
Jr. Member
 
Total Posts:  3
Joined:  2008-10-06
 

Worked great for me too, I agree with laughingbuddha - why not as standard?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
60012 users|858 users currently online|118870 forum posts