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