Over a million developers have joined DZone.

How To Install MySQL 5.0 On RHEL 4

DZone's Guide to

How To Install MySQL 5.0 On RHEL 4

Free Resource
RedHat Enterprise Linux 4 comes with MySQL 4, so it needed to be upgraded. I did it the following way. I am not responsible for anything that happens if you follow these instructions, so please understand what they do!

Make sure to replace the wget RPM downloads with the correct RPMs for your platform! These ones are for AMD/Intel 64 bit (non Itanium)..

service mysqld stop
cd ~
mkdir mysql
cd mysql
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-server-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-client-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-shared-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/MySQL-devel-standard-5.0.22-0.rhel4.x86_64.rpm/from/http://mirror.x10.com/mirror/mysql/
rpm -Uvh --nodeps MySQL-server-standard-5.0.22-0.rhel4.x86_64.rpm
rpm -Uvh MySQL-client-standard-5.0.22-0.rhel4.x86_64.rpm
rpm -Uvh MySQL-shared-standard-5.0.22-0.rhel4.x86_64.rpm
rpm -Uvh MySQL-devel-standard-5.0.22-0.rhel4.x86_64.rpm
nano -w /etc/my.cnf
# Comment out the base-dir line under [mysqld.server] - RHEL 4 / MySQL bug
adduser mysql
chown -R mysql:mysql /var/run/mysqld
chown -R mysql:mysql /var/lib/mysql
service mysql start

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}