【参考】 http://blog.csdn.net/cpplang/article/details/8462768
http://www.linuxidc.com/Linux/2015-04/116003.htm
----------------------------------------------------------------
wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm
wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm
rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm
rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm
rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm
cp /usr/share/mysql/my-default.cnf /etc/my.cnf
nohup /bin/sh /usr/bin/mysqld_safe &
vim /root/.mysql_secret #查看初始随机密码;
mysql -uxxx -p
-----------------------------------------------------------------
【记录失败的尝试】
1、yum install mysql-community-server
Error: Package: mysql-community-libs-5.7.17-1.el7.x86_64 (mysql57-community-dmr) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: mysql-community-client-5.7.17-1.el7.x86_64 (mysql57-community-dmr) Requires: libc.so.6(GLIBC_2.14)(64bit) Error: Package: mysql-community-client-5.7.17-1.el7.x86_64 (mysql57-community-dmr) Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) You could try using --skip-broken to work around the problem
2、到http://ftp.gnu.org/gnu/libc/下载
wget https://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-5.6.35-1.el7.x86_64.rpm-bundle.tar
tar -xzvf MySQL-5.6.35-1.el7.x86_64.rpm-bundle.tar
mkdir build
cd build
../configure --prefix=/opt/glibc-2.14
make -j4
#-- make -j4 执行时间很长
make install