DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

How To Install MySQL 5.0 On RHEL 4

06.17.2006
| 30598 views |
  • submit to reddit
        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
mysql