ScaleScaleScaleScale

Tips / Nginx


How to Install MySQL 5.6.x on CentOS 6 / RHEL 6

Today we are going to help you to install MySQL 5.6 on CentOS and RHEL 6.x . This tutorial will teach you how to download, install and start MySQ 5.6 server. But before we start the installation process, let’s see what’s new on MySQL 5.6.x:

Performance Improvements:

  • Index Condition Pushdown
  • Multi-Range Read
  • File Sort Optimization

InnoDB Improvements:

  • Persistent Optimizer Stats
  • New INFORMATION_SCHEMA Tables
  • Split Kernel Mutex
  • Multi-Threaded Purge

Other improvements:

  • NoSQL Interface via memcached
  • Optimized Row-Based Replication
  • Multi-Threaded Slaves Replication

For more information, please refer to MySQL documentation

Requirements

VPS/Dedicated with root access is a must, so if you don’t have a linux box, you can get one from this good hosting providers:

  • A Small Orange
  • A2 Hosting

MySQL 5.6.x installation

Download rpm files from MySQL using following download links. If you get 404 error while downloading from this links, just download the files from MySQL Download Page.

mkdir /root/temp 
cd /root/temp/
wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.13-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.13-1.el6.x86_64.rpm
wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-shared-5.6.13-1.el6.x86_64.rpm

Install downloaded rpms using rpm command line tool.

rpm -ivh MySQL-server-5.6.13-1.el6.x86_64.rpm
rpm -ivh MySQL-client-5.6.13-1.el6.x86_64.rpm
rpm -ivh MySQL-shared-5.6.13-1.el6.x86_64.rpm

Start MySQL server

/etc/init.d/mysql start

Set a root password

mysqladmin -u root password 'yourROOTpaSs'

Check MySQL Version

Verify your MySQL version installed on your system. Following command will display installed MySQL version.

mysql -V
mysql Ver 14.14 Distrib 5.6.13, for Linux (x86_64) using EditLine wrapper

Login to MySQL

Let’s login to MySQL using root access and try to create a test database to make sure it works as expected.

mysql -u root -p

Create a test database using following command.

mysql> create database testdb;

Query OK, 1 row affected (0.01 sec)

At this time, if you see that you have successfully installed MySQL 5.6.x

Popular search terms:

  • mysql version 5 6 x rhel 7
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking

  • Centos 6.4 notes:

    You need libaio installed (there is rpm no problem).
    Your rpm links hava a conflic with mysql-libs. This is a problem if you have postfix base rpm installed, you will not be able to uninstall mysql-libs ;).

    Anyway, thanks for your post sir.

    Vicente

    • admin

      Thanks for sharing!