[CentOS] Upgrading MySQL from 4.1 to 5

Tue Apr 15 22:24:45 UTC 2008
Morten Nilsen <morten at runsafe.no>

Tito Valentin wrote:
> I am trying to upgrade MySQL on CentOS 4.5 but having a hard time.  I 
> need to go from MySQL 4.1 to 5.  I downloaded the following two files:
> mysql-server-5.0.58-1.el4.centos.i386.rpm
> mysql-5.0.48-2.el4.centos.i386.rpm
> I tried to do:
> yum install mysql-server-5.0.58-1.el4.centos.i386.rpm

The command to use here would be rpm -Uvh, as these packages are not in 
the yum system.

You would need to uninstall the current mysql first, however - and to 
migrate any data, you need to use mysqldump --all --opt before that, and 
then import it back after 5.x is installed.

Last time I checked, you could not use the same database files for 
different major versions of MySQL - I could be wrong on this point, however.