Transfering Magento Database
*Note: The Best way to migrate the database is to do it command line, using mysqldump.
I have Had a few problems when transferring a Magento database. Usually when pushing a development site to Production. Importing the database sometimes throws foreign key constraint errors. What I have found is that if you use phpmyadmin to export the database you need to check the box next to disable foreign key checks. Then you can import this database with out getting the constraint errors. Exporting the database through Magento’s built in functionality does this automatically.
The next issue I have run into is that( I believe, but don’t quote me ) mysql versions prior to 4.1 don’t automatically add the commands to allow inserting primary keys with an id of 0. This will cause Magento to throw an error. The way I have found to fix this is by manually editing a few db entries to set them to an id of 0. The tables I found that need to be edited are: core_store, core_website, core_store_group, and customer_group. I believe it will allays be the last entry that needs to be set to zero, but if in doubt compare it against the old database.
Hope this helps someone else, and let me know of any other work-arrounds to this issue.

2 Responses to “ Transfering Magento Database ”
May 16th, 2009 at 12:48 pm
You should never use phpmyadmin to move databases. If at all possible use ssh. It is so much faster, easier and migrates seamlessly. Follow this instruction set provided by magento.
I had the same problems until I spent the time to set up ssh.
http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
May 18th, 2009 at 6:10 am
Using Mysql command line was much easier.