Upgrading MySQL 5.0 to 5.1 on Debian 5.0
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.







thanks for this. i also needed to change permissions on my /var/run/mysql directory as well, as that wasn’t allowing write access to the service for some reason.
HEEEEEEEEEEELP PLEASE.
lxbambit:~# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 159 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.1 (5.1.49-3) …
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
Errors were encountered while processing:
mysql-server-5.1
E: Sub-process /usr/bin/dpkg returned an error code (1)