How do I solve it? Please!!
Main Topics
Browse All TopicsI am trying to import sample data into Magento using .sql file and PHP My admin. However, I keep getting this error mesage.
Error
SQL query:
ALTER TABLE `admin_rule` ADD CONSTRAINT `FK_admin_rule` FOREIGN KEY ( `role_id` ) REFERENCES `admin_role` ( `role_id` ) ON DELETE CASCADE ON UPDATE CASCADE ;
MySQL said:
#1005 - Can't create table './*****_shop/#sql-208_1d0
Not sure why this is happening as I am using the .sql file which was provided with the template
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Short answer: it is impossible.
Detailed answer:
- Data is stored not using the usual entity-relationship model but with the EAV model, which allows to easily change data structure, eg adding a column, with no problem
- Data cells for a given products are over several tables, and might take sevreal records in each of these tables
- This is great for upgrading the databases, since there is although nothing to change. However downgrading might create a problem, leaving unused data in the tables.
- This makes direct sql update, although not totally impossible, a nightmare which might leave the tables of the product "bas" in an unstable base.
Suggested solution: better import with csv.
Is importing in csv one of your options?
Business Accounts
Answer for Membership
by: Roads_RoadsPosted on 2009-10-30 at 02:39:35ID: 25701333
"That tells you it had a problem creating the foreign key because it already exists." from
.com/board s/viewthre ad/22543/
http://www.magentocommerce