10
votes

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?

5
after yum install mysql did you do yum update and yum upgrade?Lynob
@Fischer. Yes, I did do yum update, not not yum upgrade. Did the later after getting your comment, but no change.user1032531
i think this is the only solutionLynob
@Fischer yum install MySQL-server-5.6.11-2.el6x86_64.rpm seems to take.user1032531
What repositories did you use? What is the URL? I have found nothing listed for Enterprise Linux in any the documents above, or elsewhere.Stefan Lasiewski

5 Answers

9
votes

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.

14
votes

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/

8
votes

I am no guru myself but I was happy with the result of the RPM method you mentioned since other times I have seen problems with mysql-libs being a dependency for other packages.

(depending on the 5.6 version you want and cpu)

mkdir MySQL
cd MySQL
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar
tar -xvf MySQL-5.6.16-1.el6.x86_64.rpm-bundle.tar
yum install MySQL*rpm

installs them in the correct order and removes mysql-libs in one step without conflicts.

http://dev.mysql.com/doc/refman/5.6/en/linux-installation-rpm.html

0
votes

It doesn't surprise me that MySQL is a bit behind. Why would Oracle make it easy for you to not use pay-for Oracle? </rant>

Anyway, you can get the awkwardly named, but otherwise identical MariaDB to run easily by adding a new YUM repository.

-1
votes

You can install MySQL 5.5 (mysql55-server.x86_64) from IUS repository (currently version 5.5.34 available)