Best way to install MySQL 5.6 on Centos 6.4

user1032531 picture user1032531 · Jun 17, 2013 · Viewed 54.3k times · Source

I just installed Centos 6.4, and installed MySQL using the version that came with the Centos distribution. To my dismay, it is MySQL 5.1.69 versus the current 5.6.12. As stated on http://dev.mysql.com/doc/refman/5.5/en/linux-installation-native.html, "the MySQL version will often be some way behind the currently available release", but I didn't expect that long.

[root@centosBox ~]# rpm -qa | grep mysql
mysql-5.1.69-1.el6_4.x86_64
mysql-devel-5.1.69-1.el6_4.x86_64
mysql-server-5.1.69-1.el6_4.x86_64
mysql-libs-5.1.69-1.el6_4.x86_64
[root@centosBox ~]# whereis mysql
mysql: /usr/bin/mysql /usr/lib64/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
[root@centosBox ~]# 

An alternative is to install by RPM packages which is the "recommended way to install MySQL" per http://dev.mysql.com/doc/refman/5.5/en/linux-installation-rpm.html. I have done so and it wasn't overly complicated, however, I am concerned as I've often been told that I should always install by yum when available. Towards the very end of the documentation, it does describe doing so extremely briefly using yum, however, it is so brief that I question whether it is the way to go.

So.... What is the best way for a not guru Linux user to install/upgrade MySQL on a Centos machine?

Answer

Bill Karwin picture Bill Karwin · Oct 30, 2013

Just this week (2013-10-28), MySQL announced official yum repositories for MySQL Community Edition. The packages are intended for use with RHEL-compatible Linux (e.g. CentOS).

All the details including how to set up the yum repo on your system, can be found from the announcement:

http://insidemysql.com/announcing-new-yum-repositories-for-mysql/