Installing MySQL 5.5 on CentOS 6.x

This article describes how to install MySQL 5.5 on CentOS 6.x which is not available in the default CentOS package repository. It installs the x86_64 bit version of MySQL 5.5.33-1 on a x86_64 bit machine. For i386 replace x64_64 with i386.

# Install libaio – its required by MySQL server 5.5
$ yum install libaio

# Download MySQL 5.5 installation RPMs
$ wget  http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-5.5.33-1.linux2.6.x86_64.rpm-bundle.tar/from/http://cdn.mysql.com/

# Untar the installation bundle
$ tar -xvf MySQL-5.5.33-1.linux2.6.x86_64.rpm-bundle.tar

# Install MySQL shared compact
$ rpm -Uvh ySQL-shared-compat-5.5.33-1.linux2.6.x86_64.rpm

# Install MySQL shared
$ rpm -Uvh MySQL-shared-5.5.33-1.linux2.6.x86_64.rpm

# Install MySQL client
$ rpm -Uvh MySQL-client-5.5.33-1.linux2.6.x86_64.rpm

# Install MySQL server
$ rpm -Uvh MySQL-server-5.5.33-1.linux2.6.x86_64.rpm

# Finally, start MySQL server 5.5
$ /etc/init.d/mysql start

Don’t forget to run mysql_secure_installation to secure the newly installed MySQL instance