CentOS 7中裝置mysql server的步調分享。本站提示廣大學習愛好者:(CentOS 7中裝置mysql server的步調分享)文章只能為提供參考,不一定能成為您想要的結果。以下是CentOS 7中裝置mysql server的步調分享正文
之前一向用RHEL 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 Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/ enabled=1 gpgcheck=1 gpgkey=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 Release baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=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 Server baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/ enabled=1 gpgcheck=0
從新履行yum install mysql-community-server敕令,裝置OK~