7中如何安装mysql

以前一向用处胜HEL 6.3和6.4,系统盘里自带了mysql
server,配置好yum源后,直接yum install
mysql-server就可设置mysql服务器端了,近年来用CentOS
7.1,发掘系统盘未有提供mysql-server的RPM包,在英特网网罗了半天,最终在mysql的官方网站找到答案。

只需在/etc/yum.repos.d/目录下拉长以下文件mysql-community.repo文件,内容如下:

# Enable to use MySQL 5.6[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 

上述对应的是5.6本子。

5.7本子的原委如下:

# Note: MySQL 5.7 is currently in development. For use at your own risk.# Please read with sub pages: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/[mysql57-community-dmr]name=MySQL 5.7 Community Server Development Milestone Releasebaseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

最终推行yum install mysql-community-server即可。

永利皇宫登录网址 ,自身用的是5.6本子的内容,在安装的经过中,报以下错误:

GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql"

相当大名鼎鼎,本地未有RPM-GPG-KEY-mysql文件,于是对上文的mysql-community.repo做了须臾间改善,修正后的剧情如下:

[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/enabled=1gpgcheck=0

双重实施yum install mysql-community-server命令,安装OK~

网站地图xml地图