If an old database will be transferred to a new Magento System (what does not always and not without its problems), can be attempted the following way:
It is created in phpMyAdmin, a DB backup of the corresponding DB.
>BEFORE< it is now played in the new database, should be placed at the very beginning of the downloaded DB the following lines:
SET SQL_MODE=''; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
The end of the file should then:
SET SQL_MODE=IFNULL(@OLD_SQL_MODE,''); SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS,0);
Then all save and import into the database.
Used in Magento 1.4.1.1
Found in: http://www.magentocommerce.com/boards/viewthread/8302/#t30437