Thursday, November 3, 2011

installing mysql 5.5 on linux

mysql 5.5 installation on linux :

By default RHEL6 or any older version ships with MySQL 5.1.52, but I do database development and need to test against the latest version. To get to 5.5.16 on my new RHEL6 server, I took the following steps:

STEP 1: Remove MySQL 5.1.52

I used the following commands to uninstall MySQL 5.1.52:
yum erase mysql
yum erase mysql-libs.x86_64

STEP 2: Download the RPM's

Go to MySQL GA Downloads, selected RedHat from the dropdown list, then downloaded the following x64 RedHat RPMs: Client Utilities, Development Libraries, MySQL Server, Shared Components and Compatibility Libraries.

STEP3: Install the RPM's

Then install the five RPM's, using the following commands:
rpm -ivh MySQL-devel-5.5.16-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-shared-5.5.16-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-shared-compat-5.5.16-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-server-5.5.16-1.linux2.6.x86_64.rpm
rpm -ivh MySQL-client-5.5.16-1.linux2.6.x86_64.rpm

STEP 4: Start and update root password

After installing the above RPM's, I started MySQL with:
service mysql start
and checked the version with:
mysql --version
which returned:
mysql Ver 14.14 Distrib 5.5.16, for Linux (x86_64) using readline 5.1
also check to see what yum showed with:
yum list *mysql*
which returned:
Loaded plugins: refresh-packagekit, rhnplugin
Installed Packages


MySQL-client.x86_64
5.5.16-1.linux2.6
installed
MySQL-devel.x86_64
5.5.16-1.linux2.6
installed
MySQL-server.x86_64
5.5.16-1.linux2.6
installed
MySQL-shared.x86_64
5.5.16-1.linux2.6
installed
MySQL-shared-compat.x86_64
5.5.16-1.linux2.6
installed
compat-mysql55.x86_64
5.5.16-1.el6.remi
installed

STEP 5: update the root password with:
mysqladmin -u root password '******

2 comments: