ZeroStopBits

How to Install MySQL 5.6 on CentOS 6.7

This article will show you how to install MySQL 5.6 on CentOS 6.7.

In writing this how-to, I have assumed that you are running a stock installation of CentOS 6.7, and that you DO NOT already have MySQL installed.

1. Install the MySQL Community repository

First, we need to install the Official MySQL Community repository, this is done by entering the following commands:

rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

You should now be ready to install MySQL 5.6!

2. Installing MySQL 5.6

Type in the following commands to install MySQL 5.6

yum -y install mysql mysql-server

Type in the below to verify the correct packages were installed:

rpm -qa | grep mysql

The output should look similar to the following:

mysql-community-release-el6-5.noarch
mysql-community-common-5.6.27-2.el6.x86_64
mysql-community-client-5.6.27-2.el6.x86_64
mysql-community-server-5.6.27-2.el6.x86_64
mysql-community-libs-5.6.27-2.el6.x86_64
mysql-community-libs-compat-5.6.27-2.el6.x86_64

Now you can start MySQL 5.6 using the following command:

chkconfig mysqld on
service mysqld start

Verify that MySQL 5.6 is running:

mysql -v

And you should see output similar to the following:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.27 MySQL Community Server (GPL)

That’s all she wrote!

Upgrading from MySQL 5.5 is a fairly easy process, and I’ll be writing a guide on that soon. However, upgrading from earlier versions of MySQL (such as MySQL 5.1) requires a bit more work. I’ll see writing on article on How to Upgrade MySQL 5.1 to MySQL 5.6 on CentOS 6.7 so stay tuned!

10 Comments

Tikoo

Thanks!

andyz

You’re welcome!

Danny

Hi there,
have you been able to write the article for upgrading MySQL 5.5 to MySQL 5.6?
Regards,
Danny

andyz

Hey Danny,
Not yet, but stay tuned! I’ll try and get it written up in the next couple of days 🙂

anick

The article exist? Where? I need upgrade, but i don’t now.

andyz

Hello,
I haven’t written up that article yet, keep an eye on the blog though it’s coming soon!

tongiok

hey do you now the password?

edison

mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘MyNewPass’);

Verter

Thanks, very well written for once-a-year server admins!

ChalkyLad

Did you ever get around to writing the guide on upgrading from 5.5 to 5.6?

Comments are closed. Need a hand with something? Contact us.

Need a server to practise on?

Spin up a KVM VPS and follow along with any of these tutorials without risking your production boxes.