Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to install MySQL 5.6 on Centos 6.4

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?

like image 363
user1032531 Avatar asked Jun 16 '13 22:06

user1032531


2 Answers

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/

like image 122
Bill Karwin Avatar answered Nov 05 '22 04:11

Bill Karwin


A bit off-topic but there we go.

It is recommended to install from the repositories because you can later update your software to a newer version with a simple yum upgrade. The repository takes care of that for you, as well as any dependencies the software may entertain with other libraries.

RPM Packages installed manually (even with yum, which then only acts as an installer) will have to be managed manually as well.

Since the MySQL RPM package shows no dependencies (as far as I can tell from the manual), you are safe from this side.

And to answer your question: the best method is to stick with the versions from the repository. If you need a newer version, then you took the right path.

like image 29
RandomSeed Avatar answered Nov 05 '22 05:11

RandomSeed