Updating MySQL to version 4 [long]

Joseph E. Sacco, Ph.D. joseph_sacco at comcast.net
Thu Dec 23 08:01:45 MST 2004


For reasons unknown to me, Fedora2 shipped with MySQL-3.23.58-9. For the
past year most applications that use MySQL require MySQL-4.0.x. At this
point in space-time MySQL AB is recommending MySQL-4.1

	http://dev.mysql.com/downloads/

I have been tracking MySQL-4.1 development [4.1 introduces clustering]
and its relationship to applications that use MySQL.  I believe that
using MySQL-4.1 exclusively at this juncture is not [yet] a good idea.
Your choice... 

On my system I have installed MySQL-4.0.23 as a replacement for
MySQL-3.23.58-9, with its files installed in the usual locations.
MySQL-4.1 is installed in a separate tree under /usr/local/mysql.


How to do it
------------
Upgrading requires building a new version of MySQL and rebuilding eight
existing packages that are dependent on the version of libmysqlclient.

* Fetch the source RPM for MySQL-4.0.23 from

	http://dev.mysql.com/downloads/mysql/4.0.html

* Build the MySQL binaries
        I prefer to unpack things and watch the build, which gives me
        the option of tinkering with the spec file:
        
        * rpm -ivh MySQL-4.0.23-0.src.rpm
        * cd /usr/src/yellowdog/SPEC
        * look at the spec file
        * rpmbuild -bb mysql-4.0.23.spec > /tmp/build_mysql 2>&1 &

* Install MySQL
        * cd /usr/src/yellowdog/RPMS
        * rpm -Uvh MySQL*
        
        error: Failed dependencies:
               libmysqlclient.so.10 is needed by (installed)
        perl-DBD-MySQL-2.9003-4
               libmysqlclient.so.10 is needed by (installed)
        mod_auth_mysql-20030510-4.1
               libmysqlclient.so.10 is needed by (installed)
        php-mysql-4.3.8-2.1
               libmysqlclient.so.10 is needed by (installed)
        freeradius-mysql-0.9.3-4
               libmysqlclient.so.10 is needed by (installed)
        libdbi-dbd-mysql-0.6.5-8.1
               libmysqlclient.so.10 is needed by (installed)
        MyODBC-2.50.39-18.1
               libmysqlclient.so.10 is needed by (installed)
        qt-MySQL-3.3.3-3.ydl.1
               libmysqlclient_r.so.10 is needed by (installed)
        MySQL-python-0.9.2-3.1
                                                                                                   
Upgrading from MySQL-3.23.58 to MySQL-4.0.23 requires rebuilding eight
other packages. Grrrrrrrr....

There are games you can play to satisfy these dependencies without
rebuilding the eight packages. My experiences from having played these
games is that you are better off in the long run to just rebuild the
packages.

The packages that need to be rebuilt once the new version of MySQL is
installed are:

        * perl-DBD-MySQL-2.9003-4
        * mod_auth_mysql-20030510-4.1
        * php-4.3.8-2.1
        * freeradius-0.9.3-4
        * libdbi-0.6.5-8.1
        * MyODBC-2.50.39
        * qt-3.3.3
        * mySQL-python-0.9.2-3.1

* Upgrade MySQL
run :
	rpm -Uvh --nodeps MySQL*

The option, "--nodeps", instructs RPM to ignore the dependencies.

One oddity in upgrading from MySQL-3 to MySQL-4 is a change in contents
of the directory:

	/usr/lib/mysql.

In MySQL-3, *all* mysql libraries are located in this directory.

In MySQL-4, all of the *static* mysql libraries are are located in this
directory. The shared versions of the libclient are located in /usr/lib/

This is something that will bite you when you build the other packages. 
I copied the shared versions of libclient to /usr/lib/mysql and rolled
on.

* Rebuild the eight packages...
Note: I did not upgrade to newer versions of these packages at this
juncture even though newer versions do exist for some. One thing at a
time.


-Joseph

-- 
joseph_sacco[at]comcast[dot]net



More information about the yellowdog-general mailing list