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
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).