Upgrading MySQL 3.23.58 in RHEL3 and Ensim to MySQL 4.1.20 feels like a pain
Red Hat Enterprise Linux 3 aka RHEL 3 was a very popular Linux distribution during the last 2 years. However, it is not applicable by now. It came with MySQL 3.23.58 which is already obsoleted by some web applications due to lacking of unicode support and incompatibility to later version.
Yesterday was the time to remember for me. My friend asked me to help upgrading MySQL 3.23.58 in RHEL3 to newer version because he was unable to install even Joomla! and phpBB. It seems the latest version of these applications has been already dropped support for MySQL 3.x. He didn't want to upgrade the whole distribution because it supposed to take longer time to backup and restore data. That's why I have to do some painful thing. One thing to concern was Ensim. He has not been familiar to Linux including RHEL so he bought an Ensim license to manage the site just for himselves. So I have to make it work just like before.
First of all, I started by searching for RPMs of MySQL 4.1.20 compiled in RHEL3 or with no luck so I headed to RHEL4 which is the nearest neighour. I found mysql-4.1.20-1.RHEL4.1.src.rpm
in CentOS 4.4 repository. Rebuild the source RPM is very easy.
rpmbuild --rebuild mysql-4.1.20-1.RHEL4.1.src.rpm
As a result, I got 4 packages.
- mysql-4.1.20-1.RHEL4.1.i386.rpm
- mysql-bench-4.1.20-1.RHEL4.1.i386.rpm
- mysql-devel-4.1.20-1.RHEL4.1.i386.rpm
- mysql-server-4.1.20-1.RHEL4.1.i386.rpm
Anyway, I could not install or upgrade them because of missing dependencies to libmysqlclient.so.10
. There are so many packages required that run-time library. For example, libdbi-dbd-mysql
, mod_auth_mysql
, MyODBC
, MySQL-python
, perl-DBD-MySQL
, php-mysql
, and qt-MySQL
. Fortunately, CentOS also provides libmysqlclient.so.10
in mysqlclient10-3.23.58-9.2.c4.src.rpm
rpmbuild --rebuild mysqlclient10-3.23.58-9.2.c4.src.rpm
Then I got:
- mysqlclient10-3.23.58.9.2.c4.i386.rpm
- mysqlclient10-devel-3.23.58.9.2.c4.i386.rpm
Then I upgraded mysql\*
and installed mysqlclient10\*
simulteneously. It went so good but not enough. I had to fix privilege tables for new GRANT
.
mysql_fix_privilege_tables --password=xxx
However, Ensim could not create database.
python /usr/lib/opcenter/mysql/create_db.pyc -d example -n example.com -u example
The error was as follow.
Client does not support authentication protocol requested by server; consider upgrading MySQL client
It meant MySQL-python 0.9.1 was incompatible to MySQL 4.1.20 because it was linked to libmysqlclient.so.10
. Then I rebuilded MySQL-python-1.0.0-1.RHEL4.1.src.rpm
available in CentOS 4.4 and again, it was incompatible to MySQL 4.1.20. This seems to be known problem of CentOS. So I had to use MySQL-python-1.2.1-1.src.rpm
instead. MySQL-python 1.2.1 led me to big, big, big problem. This version exactly requires Python 2.3 and it explicitly dropped support for Python 2.2. It was as what it said. It was impossible to install and use that module in Python 2.2.
I decided to make it run in Python 2.2 by modifying MySQL-python.spec
to remove Requires
and BuildRequires
dependencies. It was a painful hours. As a result, it worked! If you want to try it out, get the patch attached in this article.
The nightmare was not over yet. Ensim which written in Python worked just fine. But PHP application still did not because I had to rebuild php
first.
rpmbuild --rebuild php-4.3.2-33.ent.src.rpm
I don't have time to test it in more detail. Hopefully it works. Anyway, I recommended my friend to use CentOS or Ubuntu in conjunction with VHCS or ISPConfig.
Tags: mysql, redhat, centos, ubuntu, python, vhcs, ispconfig
Attachment | Size |
---|---|
MySQL-python-python2.2.patch_.txt | 32.14 KB |
- sugree's blog
- 645 reads
Post new comment