Home > Database > Mysql Tutorial > 用Yum安装最新的MySQL版本_MySQL

用Yum安装最新的MySQL版本_MySQL

WBOY
Release: 2016-06-01 13:28:26
Original
800 people have browsed it

bitsCN.com

用Yum安装最新的MySQL版本

 

通常在使用Yum安装MySQL时,默认安装的是伴随OS发布的旧MySQL版本。

要安装最新的MySQL版本,你必须去Oracle的MySQL主页,下载最新的发布版本,然后再安装。

现在我们不必那么麻烦了,YUM库里面已经有了最新的MySQL版本。

使用Yum,现在你总是可以安装最新的MySQL社区GA版,还有Workbench和驱动连接器Connector。

怎样安装呢?

只需两步:

1、使用RPM包

从 dev.mysql.com/downloads/repo/下载最新的RPM包并安装。

[java] 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  2、手动把文件添加到 /etc/yum.repos.d/目录把以下的内容添加到mysql-community.repo文件中:[java] [mysql-community]  name=MySQL Community Server   baseurl=URL  enabled=1  gpgcheck=1  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql  
Copy after login

根据自己的OS版本,替换适合的baseurl=URL内容:

1)对于EL6 (Centos6 / Redhat 6)[html] baseurl=http://repo.mysql.com/yum/mysql-community/el/6/$basearch/  2)对于Fedore 18 and 19:[html] baseurl=http://repo.mysql.com/yum/mysql-community/fc/$releasever/$basearch/  
Copy after login

注意:gpgcheck=1,这表示我们需要添加GnuPG key

3、安装包

现在我们使用Yum命令即可安装最新版的MySQL Community Server

[java] yum install mysql-server  
Copy after login

4、列出有效的包

要列出Yum仓库中有效的包,可以使用下面的命令:

[html] 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                                             mysql-community  mysql-connector-odbc.x86_64                                                   5.2.6-1.el6                                              mysql-community  mysql-workbench-community.x86_64                                       6.0.7-4.el6                                              mysql-community  
Copy after login

 

 

要注意:对于生产服务器要先测试、再测试!!!

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template