<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>服务器安全维护工作室 &#187; CentOS7，MySQL5.6，安装MySQL5.6</title>
	<atom:link href="https://www.fuwuqiok.com/tag/centos7%ef%bc%8cmysql5-6%ef%bc%8c%e5%ae%89%e8%a3%85mysql5-6/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqiok.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Mar 2020 07:28:40 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.26</generator>
	<item>
		<title>Amazon CentOS7 AMI安装MySQL5.6教程</title>
		<link>https://www.fuwuqiok.com/amazon-centos7-ami%e5%ae%89%e8%a3%85mysql5-6%e6%95%99%e7%a8%8b/</link>
		<comments>https://www.fuwuqiok.com/amazon-centos7-ami%e5%ae%89%e8%a3%85mysql5-6%e6%95%99%e7%a8%8b/#comments</comments>
		<pubDate>Thu, 13 Aug 2015 14:35:58 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[网站代维]]></category>
		<category><![CDATA[Amazon CentOS7 AMI安装MySQL5.6教程]]></category>
		<category><![CDATA[aws服务器代维]]></category>
		<category><![CDATA[CentOS7，MySQL5.6，安装MySQL5.6]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=2514</guid>
		<description><![CDATA[<p>有客户需要让这次在Amazon CentOS7 AMI安装MySQL5.6.22。 centos用户登录到Am [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/amazon-centos7-ami%e5%ae%89%e8%a3%85mysql5-6%e6%95%99%e7%a8%8b/">Amazon CentOS7 AMI安装MySQL5.6教程</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>有客户需要让这次在Amazon CentOS7 AMI安装MySQL5.6.22。</p>
<p>centos用户登录到Amazon EC2服务器以后，sudo到root用户。</p>
<p>在CentOS7 AMI执行yum install mysql-server命令会发现无法安装mysql server。</p>
<pre># sudo su -
# yum install mysql-server
Loaded plugins: fastestmirror
base                                                     | 3.6 kB     00:00
epel/x86_64/metalink                                     | 5.5 kB     00:00
epel                                                     | 4.4 kB     00:00
extras                                                   | 3.4 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
updates                                                  | 3.4 kB     00:00
epel/x86_64/primary_db                                     | 3.8 MB   00:00
(1/2): epel/x86_64/updateinfo                              | 230 kB   00:00
(2/2): epel/x86_64/pkgtags                                 | 1.3 MB   00:00
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: s3-mirror-ap-northeast-1.fedoraproject.org
 * extras: www.ftp.ne.jp
 * rpmforge: ftp.riken.jp
 * updates: www.ftp.ne.jp
No package mysql-server available.
Error: Nothing to do
</pre>
<p>因为，CentOS7的默认数据库是MariaDB。</p>
<p>&nbsp;</p>
<h2>1, 配置MySQL5.6的Repository</h2>
<p><strong>访问http://www.mysql.com/downloads/以后，点击「Downloads」→「Yum Repository」。</strong></p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/mysql.org_.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/mysql.org_.png" alt="mysql.org_" width="1341" height="637" /></a></p>
<p><strong>选择Red Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent), RPM Package的「Download」</strong></p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Download.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Download.png" alt="Download" width="1033" height="535" /></a><br />
<strong><br />
在这里会显示登录Oracle的页面，但是不必登录，拷贝No thanks, just start my download.的链接就可以。</strong></p>
<p>拷贝的链接是：http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/MySQL5.6-Repository.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/MySQL5.6-Repository.png" alt="MySQL5.6-Repository" width="1914" height="859" /></a></p>
<p><strong>配置MySQL5.6的yum源。</strong></p>
<pre># rpm -ivh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Retrieving http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql-community-release-el7-5    ################################# [100%]
</pre>
<p><strong>确认MySQL5.6yum源存在。</strong></p>
<pre># yum repolist
Loaded plugins: fastestmirror
mysql-connectors-community                               | 2.5 kB     00:00
mysql-tools-community                                    | 2.5 kB     00:00
mysql56-community                                        | 2.5 kB     00:00
(1/3): mysql-connectors-community/x86_64/primary_db        | 7.0 kB   00:00
(2/3): mysql-tools-community/x86_64/primary_db             |  11 kB   00:00
(3/3): mysql56-community/x86_64/primary_db                 |  59 kB   00:00
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: www.ftp.ne.jp
 * rpmforge: ftp.riken.jp
 * updates: www.ftp.ne.jp
repo id                           repo name                               status
base/7/x86_64                     CentOS-7 - Base                         8,465
epel/x86_64                       Extra Packages for Enterprise Linux 7 - 6,912
extras/7/x86_64                   CentOS-7 - Extras                         102
mysql-connectors-community/x86_64 MySQL Connectors Community                 12
mysql-tools-community/x86_64      MySQL Tools Community                      12
mysql56-community/x86_64          MySQL 5.6 Community Server                 94
rpmforge                          RHEL 7 - RPMforge.net - dag               245
updates/7/x86_64                  CentOS-7 - Updates                      1,497
repolist: 17,339
</pre>
<h2>2, 安装MySQL</h2>
<pre># yum install mysql-server

# mysql --version
mysql  Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using  EditLine wrapper
</pre>
<p>成功的在Amazon CentOS7 AMI上安装了MySQL5.6.22。</p>
<h2>小结</h2>
<p>CentOS7，好像有不少改变呀。好像service命令变为systemctl命令了。</p>
<pre># service mysqld stop
Redirecting to /bin/systemctl stop  mysqld.service
</pre>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/amazon-centos7-ami%e5%ae%89%e8%a3%85mysql5-6%e6%95%99%e7%a8%8b/">Amazon CentOS7 AMI安装MySQL5.6教程</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/amazon-centos7-ami%e5%ae%89%e8%a3%85mysql5-6%e6%95%99%e7%a8%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
