[CentOS 3.5] How do I upgrade MySQL to 4.1?

Hey, I’m on CentOS 3.5 and need to upgrade MySQL to 4.1 (from 3.23.58).

How do I safely do that?

Thanks,
Dave

InteWorx has 4.0 rpm’s available (need to install manually) but not 4.1 (yet). You would need to get them elsewhere or compile from source. The should work on InterWorx but I don’t know if it’s been tested yet. You won’t break InterWorx itself sinc it uses it’s own instance of mysql but you could run into problems with InterWoorx controling MySQL

I’m running the following on CentOS 3.5 with no problems:

[root@iworx root]# rpm -qa | grep mysql
mysql-iworx-4.0.21-3.cos3x.iworx
mysql-shared-compat-4.0.21-100.iworx
mysql-server-4.0.21-104.iworx
mysql-client-4.0.21-104.iworx
php-mysql-4.3.11-100.cos3x.iworx
mysql-devel-4.0.21-104.iworx
[root@iworx root]#

I can give you detailed instructions on how to upgrade this far if you’d like. Just let me know.

If you would send me / post those direction, that would be great!

Do you know if the newer version of PHP is the CLI version (not CGI) and has tools like ‘phpize’?

There’s a slight chance that the software I’m installing (CiviCRM) will require MySQL 4.1 and not just 4.0.

Dave

Okay here you go.

As always, no gurantee is expressed or implied. All I can say is that it’s worked for me about three times.

  1. First check which mysql rpm’s you have installed:


[root@iworx root]# rpm -qa | grep mysql
mysql-iworx-4.0.21-3.cos3x.iworx
mysql-3.23.58-15.RHEL3.1
php-mysql-4.3.11-100.cos3x.iworx
mysql-devel-3.23.58-15.RHEL3.1
mysql-server-3.23.58-16.RHEL3.1
mysql-shared-compat-4.0.21-100.iworx
[root@iworx root]# 

The rest of this depends a little on which ones are actually on your box: The exact names of some of your packages may vary.

  1. Install the newest php-mysql (if you don’t have it)


rpm -ivh http://updates.interworx.info/iworx/RPMS/cos3x/i386/php-mysql-4.3.11-100.cos3x.iworx.i386.rpm  


use rpm -Uvh if the package is installed with an older version

  1. Install the basic mysql (mysql-iworx)

rpm -ivh http://updates.interworx.info/iworx/RPMS/cos3x/i386/mysql-iworx-4.0.21-3.cos3x.iworx.i386.rpm 

  1. Then upgrade the other packages all at once due to dependencies that each have. If you don’t have an older version of the older rpm installed then omit it here

The following command should be ONE LINE



rpm --force -Uvh http://updates.interworx.info/iworx/RPMS/cos3x/legacy/i386/mysql-client-4.0.21-104.iworx.i386.rpm http://updates.interworx.info/iworx/RPMS/cos3x/legacy/i386/mysql-devel-4.0.21-104.iworx.i386.rpm http://updates.interworx.info/iworx/RPMS/cos3x/legacy/i386/mysql-server-4.0.21-104.iworx.i386.rpm http://updates.interworx.info/iworx/RPMS/cos3x/legacy/i386/mysql-shared-4.0.21-104.iworx.i386.rpm 


4a. (optional) Install any of the above paclages which you do not have older versions of

rpm -ivh <package_list>
  1. Verify the upgrade

[root@iworx ]# rpm -qa | grep mysql
mysql-iworx-4.0.21-3.cos3x.iworx
mysql-shared-compat-4.0.21-100.iworx
mysql-server-4.0.21-104.iworx
mysql-client-4.0.21-104.iworx
php-mysql-4.3.11-100.cos3x.iworx
mysql-devel-4.0.21-104.iworx
[root@iworx ]#

5.a mysql-iworx-4.0.21-3.cos3x.iworx replaces mysql-3.23.58-15.RHEL3.1
I’ve done this on several servers and sometimes mysql-3.23.58-15.RHEL3.1 disappears and sometimes it doesn’t. You can safely remove it


rpm -e mysql-3.23.58-15.RHEL3.1 

That should be it.

Awesome. Thanks. And of course the first step is to backup your data! :slight_smile:

Any insight in case I have to install 4.1? Should I go with RPMs from somewhere else? Compile actual source? Etc…

Thanks again,
Dave

Of course you need to back up your databases located in

/var/lib/mysql

That should go without saying if it’s a production box with live sites on it. When I’ve done this, in all but one instance, the box in question had nothing worth backing up on them :wink:

As for the 4.1 question I’m sure that they are available somwhere in RPM format but remember to upgrade all of the listed ones to the same version and make sure to get ones for CentOS 3.4 or 3.5 (best) bo minimize conflicts.

That upgrade process would be the same as above only different versions numbers.

A source based upgrade is also possible but would be more messy for someone not used to it because of all of the packages that would need to be upgraded.

CentOS 3.5 is so common I have a hard time believeing the RPM’s aren’t there somewhere. I’ve stayed with 4.0 because these rpm’s have been tested to work with InterWorx.

It should be saud that around InterWorx 1.7 or 1.8 they DID try giving everybody these 4.x rpm’s but enough users experienced problems outside of InterWorx with their own scripts that they abandoned that and made them available but not standard.

Good Luck!

abosultely need to do this from source RPM, take a look at

http://interworx.info/forums/showpost.php?p=4065&postcount=35

from Chris