日期:2014-05-16 浏览次数:20747 次
作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs
通常在使用Yum安装MySQL时,默认安装的是伴随OS发布的旧MySQL版本。
要安装最新的MySQL版本,你必须去Oracle的MySQL主页,下载最新的发布版本,然后再安装。
现在我们不必那么麻烦了,YUM库里面已经有了最新的MySQL版本。
使用Yum,现在你总是可以安装最新的MySQL社区GA版,还有Workbench和驱动连接器Connector。
怎样安装呢?
只需两步:
1、使用RPM包
从 dev.mysql.com/downloads/repo/下载最新的RPM包并安装。
wget http://dev.mysql.com/get/mysql-community-release-el6-3.noarch.rpm/from/http://repo.mysql.com/ sudo yum localinstall -y mysql-community-release-el6-3.noarch.rpm
把以下的内容添加到mysql-community.repo文件中:
[mysql-community] name=MySQL Community Server baseurl=URL enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
1)对于EL6 (Centos6 / Redhat 6)
baseurl=http://repo.mysql.com/yum/mysql-community/el/6/$basearch/
baseurl=http://repo.mysql.com/yum/mysql-community/fc/$releasever/$basearch/
详情见:http://dev.mysql.com/doc/refman/5.6/en/checking-gpg-signature.html
3、安装包
现在我们使用Yum命令即可安装最新版的MySQL Community Server
yum install mysql-server
要列出Yum仓库中有效的包,可以使用下面的命令:
sudo yum --disablerepo=\* --enablerepo=mysql-community list available Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Available Packages mysql-community-client.x86_64 5.6.14-3.el6 mysql-community mysql-community-common.i686 5.6.14-3.el6 mysql-community mysql-community-common.x86_64 5.6.14-3.el6 mysql-community mysql-community-devel.i686 5.6.14-3.el6 mysql-community mysql-community-devel.x86_64 5.6.14-3.el6 mysql-community mysql-community-embedded.i686 5.6.14-3.el6 mysql-community mysql-community-embedded.x86_64 5.6.14-3.el6 mysql-community mysql-community-embedded-devel.i686 5.6.14-3.el6 mysql-community mysql-community-embedded-devel.x86_64 5.6.14-3.el6 mysql-community mysql-community-libs.i686 5.6.14-3.el6 mysql-community mysql-community-libs.x86_64 5.6.14-3.el6 mysql-community mysql-community-libs-compat.i686 5.6.14-3.el6 mysql-community mysql-community-libs-compat.x86_64 5.6.14-3.el6 mysql-community mysql-community-server.x86_64 5.6.14-3.el6 mysql-community mysql-community-test.x86_64 5.6.14-3.el6