I've successfully upgraded MySQL on a Fedora server by following these steps:
- Download the server, client, and "Dynamic client libraries
(including 3.23.x libraries)" rpms.
- rpm -Uvh --nodeps MySQL-server-4.0.18-0.i386.rpm
- rpm -Uvh MySQL-shared-compat-4.0.18-0.i386.rpm
- rpm -Uvh MySQL-client-4.0.18-0.i386.rpm
- I had to manually kill the mysqld process and restart, but after that everything works fine, including my php code.
Here is the link to download
Go to the rpm's section(second section down on the page)
http://dev.mysql.com/downloads/mysql/4.0.html