WordPress 2.9 was released a couple of days ago. I read about all the cool new features and said to myself – “hey, I need that version!” so I used my favorite WordPress Automatic Upgrade plug-in to upgrade my primary blog to WP 2.9.
I got almost all the way to the end of the upgrade process, where it told me a “CLICK HERE TO COMPLETE THE FINAL STEP.” When I clicked OK I was rewarded with this nice little message: “ERROR: WordPress 2.9 requires MySQL 4.1.2 or higher”
Apparently, my blog was running a version earlier than that. So now all my files are upgraded to WP 2.9, but my database is not compatible. Now what!?
Damage Control
My blog is officially offline.
I use BlueHost and 1and1 for my WordPress hosting. I primarily use BlueHost now because they’ve got the whole WordPress install and upgrade process dialed in, but this blog was hosted on 1and1. I looked at their help to see how to upgrade my database, and a quick check told me that I had to do a lot of stuff to make that happen.
Luckily, I did perform the backups that are recommended as part of the upgrade process with the plug-in. So I took my backup files and copied them over my the WP 2.9 files that had just been copied into my blog directory. My blog was now restored to a state where it was displaying posts, but the editing controls in the WordPress Admin panel were not working.
Upgrading MySQL Database
So I was faced with the task of upgrading MySQL to 4.1.2 or higher. The instructions from 1and1 were:
1) Export your existing database using phpMyAdmin
2) Create a new MySQL 5 database
3) Import your database file into your new database using phpMyAdmin
4) Update your wp-config.php with the new database info
Ok, I think I can handle this.
So I went into the 1and1 control panel and created a new MySQL 5 database. Then I exported my existing database:
Then I imported it into my new MySQL 5 Database:
This seems easy enough. But wait:
Access Denied.
DAMMIT!
Ok. Keep calm. What the __ do I do next?
Well, after trying it a few more times and realizing I wan’t getting anywhere, I called 1and1 support. The support guy had to keep putting me on hold, but eventually he told me that I needed to delete a couple of lines at the beginning of the MySQL back up file.
These lines specified the old database name, which was causing the permissions error.
Ok, now that’s cool, but my SQL backup file is 4.6mb, and I see that the max file size on the import screen is:
(Max: 2,048KB)
Nice.
What I ended up doing is opening the SQL backup file in a text editor, copying the entire text from the file, and pasting it into the box on the import screen.
I was rewarded with a box that said my import was successful.
Finally… Upgrade Success
I then went and put WordPress into maintenance mode, updated the wp-config.php file with my new database settings, took it out of maintenance mode and verified everything was working fine.
Tip: You can put WordPress into maintenance mode by creating a file in your WordPress directory called .maintenance with the following code in it: <?php $upgrading = time(); ?> to take it out of maintenance mode, just rename or delete the file.
Now when I went through the WordPress Automatic Upgrade process, the WordPress 2.9 upgrade went smoothly.
Man, that was a hassle! I wish WP Automatic Upgrade would have told me up front that my database wasn’t compatible with WordPress 2.9. It would have saved me a lot of last minute panic.
Anyway, I wanted to share this in case anyone else has a similar problem and does a panicked Google search looking for a solution!












{ 12 trackbacks }
{ 64 comments… read them below or add one }
← Previous Comments
Thanks for sharing this. I just had to do this for a friend’s site I’m helping out with and would’ve been completely lost if it weren’t for your guide:)
I am having a world of trouble trying to export my wordpress db from 1and1.com are those the settings you used (the ones in the image or did you also select add drop tables and unchecked the Use hexadecimal for binary fields?
To: digitallife
the export should work with all settings as shown;
have you set up the .htaccess file to run your 1and1 site in PHP5?
Thanks. This also helped me migrate. The 1and1 documentation for upgrading databases is too limited and not all that helpful. I ended up cutting and pasting into the query field as well.
← Previous Comments