Upgrading to MySQL 5.0.33 on RHEL and CentOS
January 12, 2007 by Jason · 11 Comments
If you follow the MySQL Announcement list then you already know that version 5.0.33 was just released. Unfortunately, those of you on RHEL/CentOS (and even Fedora, at least for the time being) do not have any way to install it unless you compile from the tar.gz source because MySQL has decided to only regularly release binaries to those that pay them for the Enterprise version. Compiling from source, by the way, is something that MySQL does NOT recommend that you do, even though, at current, this is the only option that they give you. Funny, isn't it?
That said, I've taken a slightly different approach to this tutorial as compared to my "Upgrade to MySQL 5.0.27" tutorial. That how-to dealt with rebuilding the src.rpm from the FC7 development tree so that it would work on RHEL & CentOS 4. This how-to uses the spec file from the official MySQL src.rpm for 5.0.27, upgrades the source to 5.0.33, and then adapts it so that it generates RH/Fedora-style RPMs for an easy upgrade.
The complete list of changes I made are as follows:
- Upgraded sources from 5.0.27 to 5.0.33.
- Modified package names to match those used by the RH/Fedora-supplied packages (mysql, mysql-server, etc. instead of MySQL-client, MySQL-server, etc.).
- Renamed init script and logrotate script to "mysqld" from "mysql" to match the RH/Fedora names.
- Merged the "MySQL-client" and "MySQL-shared" packages into "mysql" to match what is provided by RH/Fedora.
- Added two "installed but abandoned" binaries and two help files into the "mysql-server" package (not sure why these are left behind but the RH/Fedora packages normally have them).
- Removed all of the "Pro" and "Commercial" conditionals to clean things up a bit.
As you can imagine, there are far too many spec file changes to list them all and to give a how-to from beginning to end. As such, I'm just going to provide a src.rpm file that you can rebuild on your own. I've also included the i386 binaries for those that are are looking for the easy route (x86_64 users will need to build from the src.rpm).
Update (9/24/2009): Packages deleted, use the yum repository instead.
Digg this story
Hi Jason,
Thanks for the great info here. I am trying to upgrade MySQL to 5.0.33 and I get a bunch of the dependency problems mentioned at the bottom of my post here. Ordinarily, I would just install the stuff, and work out dependencies, but unfortunately this is a live server and one of the items depending on the libmysqlclient.so.14 is dovecot that is my POP adapter.
Any idea what the best way to upgrade is, while minimizing downtime. I have enough stuff built up on this machine that I am looking at just rebuilding the server from scratch and just going with SUSE or Debian that has MySQL 5 available without the frittering around.
If I try to upgrade the MySQL 4.1 to 5.0 it requires the update of perl extensions, which they trigger a complete meltdown of webmin, dovecot, wildfire, and more. If I have to rebuild the server from scratch, I will likely switch distros, as I have found way too many things in the course of using CentOS, that require so much workaround to move up to the next versions.
What is your take on this? Should I stay with CentOS or move to RH, SUSE, or Debian?
Is it possible to do a side-by-side install of MySQL 5 with MySQL 4? I don'twant to, but it seems my options are limited for upgrading my working server??
error: Failed dependencies:
libmysqlclient.so.14 is needed by (installed) dovecot-0.99.11-4.EL4.i386
libmysqlclient.so.14 is needed by (installed) perl-DBD-MySQL-2.9004-3.1.i386
libmysqlclient.so.14 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient.so.14 is needed by (installed) php-mysql-5.1.6-1.2.1.centos.i386
libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) dovecot-0.99.11-4.EL4.i386
libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) php-mysql-5.1.6-1.2.1.centos.i386
libmysqlclient_r.so.14 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
libmysqlclient_r.so.14(libmysqlclient_14) is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
mysql = 4.1.20-1.RHEL4.1 is needed by (installed) mysql-server-4.1.20-1.RHEL4.1.i386
Howdy Jason,
Just wanted to put this information out there for the users that may come by here and read this. I finally got things moving by enabling the centosplus repository and updating
vi /etc/yum.repos.d/CentOS-Base.repo
find.... and change...
--------------
..
[centosplus]
gpgcheck=1
enabled=1
..
--------------
then just yum update -y got me up to at least MySQL 5.0.27, so I am happy to at least start there. After this update is done, I will try your 5.0.33 release andlet you know how it goes!
Yeah, as you already noticed, libmysqlclient.so.14 is available from the centosplus repo. Once that is installed you should be able to upgrade to 5.0.33 using my src.rpm or teh binary packages.
Hi, the information you provided is great, I am a newbie to CentOS4 and not able to install the rpm you provided here. pls advise the step to install it or what else needs to be done.
Just wanted to add that this is what I am getting when I run the command:
rpm -i mysql-5.0.33-jason.2.src.rpm
warning: user brewbuilder does not exist - using root
Not having the "brewbuilder" user isn't really a problem, you shouldn't build as 'root' though, that is a security risk and some programs won't build unless you're a non-root user.
As to your not being to install the RPM, your second comment leads me to believe that you are trying to install the src.rpm, not the compiled RPM. If you're going to use the src.rpm then you also need to build it into the actual RPMs. It was provided for those that are compiling for a non-x86 system or that wanted to see what was changed.
If you're using an x86 system then you should just use the binary packages provided.
Jason, thanks for the reply! This clears things up for me. Which binaries should I be downloading then? Yoou have four listed, P
The first one is the client and shared libraries and is required for any install. The second contains the 'mysqld' daemon so that is needed for any system that will be acting as a MySQL server. The third is the devel package that is needed if you are going to compile anything against the MySQL libraries (like PHP). The last is the test package. It isn't needed unless you are experiencing some kind of stability issue.
Hi Jason I am trying to loas ser-mysql. I am able to load mysql 5 however ser-mysql requires ibmysqlclient.so.14.
Is there a way to get ibmysqlclient.so.14 loaded insted of ibmysqlclient.so.15 supplied in mysql.
I am working with centos.
I wonder if fedora would be better.
MySQL 5 comes with so.15, MySQL 4 comes with so.14, and MySQL 3 comes with so.10. If you are running MySQL 5 but still have programs with dependencies on an older library then you can install the mysqlclient10 or mysqlclient14 packages out of my repo or from the centosplus repo.