Skip to content

1025 MySQL error when upgrading magento

September 26, 2011

Upgrading Magento is a tricky task. Even though the process is somewhat easy, when you find errors that they are not always easy to solve. One of these errors is the 1025 mysql error. This error is related to foreign keys checks.

There is no easy way to solve it. You can try modifying the app/etc/config.xml file, look for the <initStatements> tag and modify it to look like this:

<initStatements>SET NAMES utf8; SET FOREIGN_KEY_CHECKS=0;SET UNIQUE_CHECKS=0;</initStatements>

We’re forcing magento to don’t check foreign keys when it works. This could work. It didn’t in my particular case.

The thing is that if I update from 1.8 to:

  • 1.9 » got 1025 mysql error
  • 1.10 » got 1025 mysql error
  • 1.11 » got 1025 mysql error

When I had almost lost hope I tried the version… and it worked! Ok, this has no sense at all. But the lesson I learnt was: try everything before giving up when upgrading magento.

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: