Upgrading MySQL 5.0 to 5.1 on Debian 5.0

By Rob, May 16, 2009 5:00 PM

I have a small low-power x86 machine at home running Debian 5.0. I regularly check for updates to any of the packages I have installed on it, and for a while its been offering an upgrade to MySQL. I dont use MySQL much at home, so I havent been too bothered about keeping that up to date. However, I got fed up of it nagging me, so I decided to proceed with the update. The following is what happened:

Preparing to replace mysql-server 5.0.51a-24 (using .../mysql-server_5.1.34-0.dotdeb.1_all.deb) ...
 Unpacking replacement mysql-server ...
 (Reading database ... 120744 files and directories currently installed.)
 Removing mysql-server-5.0 ...
 Stopping MySQL database server: mysqld.
 Removing mysql-client-5.0 ...
 Processing triggers for man-db ...
 Selecting previously deselected package mysql-client-5.1.
 (Reading database ... 118764 files and directories currently installed.)
 Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.34-0.dotdeb.1_i386.deb) ...
 Selecting previously deselected package mysql-server-5.1.
 Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.34-0.dotdeb.1_i386.deb) ...
 Processing triggers for man-db ...
 Processing triggers for menu ...
 Setting up mysql-client-5.1 (5.1.34-0.dotdeb.1) ...
 Setting up mysql-server-5.1 (5.1.34-0.dotdeb.1) ...
 Installing new version of config file /etc/init.d/mysql ...
 Stopping MySQL database server: mysqld.
 Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

 invoke-rc.d: initscript mysql, action "start" failed.
 dpkg: error processing mysql-server-5.1 (--configure):
 subprocess post-installation script returned error exit status 1
 dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.1; however:
 Package mysql-server-5.1 is not configured yet.
 dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
 Processing triggers for menu ...
 Errors were encountered while processing:
 mysql-server-5.1
 mysql-server

Aaargh! My good MySQL install has been blown away, and the update has failed to install properly!

The error messages were less than helpful, and as far as I could see, I had all the prerequisite packages installed. What to do?

After a bit of googling, I came across someone with the same problem at this forum thread.

They suggested that MySQL 5.1 cannot have ‘skip-bdb’ in the my.cnf configuration file. As my Debian machine is a low memory box, I had ‘skip-bdb’ set for MySQL 5.0 in order to save some memory. After commenting ‘skip-bdb’ out of the my.cnf file (placing # in front of it), I tried an ‘apt-get -f install’, and the installation completed successfully.

8 Responses to “Upgrading MySQL 5.0 to 5.1 on Debian 5.0”

  1. Evert says:

    Thanks for the tip! I ran into the same problem, and your fix helped me out!
    In a way it makes sense that that config option is no longer supported, since BDB support has been removed.

    So before upgrading 5.0->5.1, make sure you have converted ALL your BDB tables to another format!!

  2. balsagoth says:

    Thanks a lot!
    Is there any blog or newsgroup that updates this kind of problems in upgrades?

  3. Lawrence says:

    Thanks – saved me.

    Not documented in the MySQL site or Debian site for upgrades.
    Not sure why a skip-bdb should kill the update, and not pop an error anywhere, but you seem be the first google result for upgrade mysql 5 5.1 debian.

  4. Rob says:

    Glad this was of help. It really frustrated me at the time. As you say Lawrence, there’s nothing in the documentation about it, or at least nothing that I could find.

    It’s only when you really dig that you find out that BDB support has been dropped from 5.1, but that still shouldnt make the upgrade barf if you’re not actually using BDB!

  5. Plow says:

    You’r the Man !!!

  6. Dan says:

    Just to say many thanks for this. You potentially saved me a lot of time hunting around…

  7. Greg says:

    Thanks Guys,
    It really works!

  8. [...] Upgrading MySQL 5.0 to 5.1 on Debian 5.0 ApacheFinnixGNU/LinuxInternet Hosting ServiceLinodeMySQLSystem AdministrationTroubleshootingUbuntuVPS Liked this post? Why not subscribe to WebMaster View? [...]

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Panorama Theme by Themocracy