<?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; Mysql</title>
	<atom:link href="http://www.qiais.com/achives/category/database/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.qiais.com</link>
	<description>琪埃信息系统</description>
	<lastBuildDate>Tue, 11 Feb 2020 01:50:29 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0</generator>
	<item>
		<title>CentOS7安装mysql</title>
		<link>http://www.qiais.com/achives/803/</link>
		<comments>http://www.qiais.com/achives/803/#comments</comments>
		<pubDate>Sat, 20 Feb 2016 06:27:57 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=803</guid>
		<description><![CDATA[CentOS7中Mysql的安装步骤 1.删除mariadb 2.安装 3.启动Mysql 4.初始化DB]]></description>
				<content:encoded><![CDATA[<p><strong>CentOS7中Mysql的安装步骤</strong></p>
<p>1.删除mariadb</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# yum list installed | grep maria
mariadb-libs.x86_64                        1:5.5.44-2.el7.centos       @base    
[root@ip-10-167-141-167 centos]# yum -y remove mariadb-libs
[root@ip-10-167-141-167 centos]# 
</pre>
<p>2.安装</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# yum -y install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[root@ip-10-167-141-167 centos]# yum -y install mysql mysql-devel mysql-server mysql-utilities
</pre>
<p>3.启动Mysql</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# systemctl is-enabled mysqld.service
enabled
#disable的情况下
[root@ip-10-167-141-167 centos]# systemctl enable mysqld.service
[root@ip-10-167-141-167 centos]# systemctl start mysqld.service
</pre>
<p>4.初始化DB</p>
<pre class="brush: plain; title: ; notranslate">
[root@ip-10-167-141-167 centos]# mysql_secure_installation
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/803/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS6.5 安装 Mysql5.6</title>
		<link>http://www.qiais.com/achives/748/</link>
		<comments>http://www.qiais.com/achives/748/#comments</comments>
		<pubDate>Thu, 28 Aug 2014 03:30:19 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=748</guid>
		<description><![CDATA[CentOS6系列默认安装的Mysql版本为5.1，今天讨论如何将其升级到5.6 查看现有mysql版本 删除...]]></description>
				<content:encoded><![CDATA[<p>CentOS6系列默认安装的Mysql版本为5.1，今天讨论如何将其升级到5.6</p>
<p>查看现有mysql版本</p>
<pre class="brush: plain; title: ; notranslate">
# rpm -qa | grep mysql
mysql-utilities-1.3.6-1.el6.noarch
mysql-server-5.1.71-1.el6.x86_64
mysql-libs-5.1.71-1.el6.x86_64
mysql-5.1.71-1.el6.x86_64
mysql-connector-python-1.1.4-1.el6.noarch
mysql-devel-5.1.71-1.el6.x86_64
</pre>
<p>删除旧版本Mysql</p>
<pre class="brush: plain; title: ; notranslate">
# yum remove mysql*
</pre>
<p>添加mysql库</p>
<pre class="brush: plain; title: ; notranslate">
# yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
</pre>
<p>安装新的Mysql</p>
<pre class="brush: plain; title: ; notranslate">
#yum install mysql mysql-devel mysql-server mysql-utilities
</pre>
<p>查看新版本</p>
<pre class="brush: plain; title: ; notranslate">
# rpm -qa | grep mysql
mysql-community-libs-5.6.20-4.el6.x86_64
mysql-community-client-5.6.20-4.el6.x86_64
mysql-utilities-1.4.4-1.el6.noarch
mysql-community-release-el6-5.noarch
mysql-community-common-5.6.20-4.el6.x86_64
mysql-connector-python-1.2.2-1.el6.noarch
mysql-community-server-5.6.20-4.el6.x86_64
mysql-community-devel-5.6.20-4.el6.x86_64
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/748/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql导入Gb级的数据（备忘录）</title>
		<link>http://www.qiais.com/achives/725/</link>
		<comments>http://www.qiais.com/achives/725/#comments</comments>
		<pubDate>Thu, 08 May 2014 04:28:39 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=725</guid>
		<description><![CDATA[zcat myfile.sql.gz &#124; mysql -u root -ppassword mydb gzca...]]></description>
				<content:encoded><![CDATA[<p>zcat myfile.sql.gz | mysql -u root -ppassword mydb<br />
gzcat myfile.sql.gz | mysql -u root -ppassword mydb</p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/725/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>亚马逊AWS上安装Nginx(Linux,CentOS环境)</title>
		<link>http://www.qiais.com/achives/430/</link>
		<comments>http://www.qiais.com/achives/430/#comments</comments>
		<pubDate>Sat, 08 Feb 2014 06:18:44 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=430</guid>
		<description><![CDATA[以前一直使用Apache服务器，但是在内存贵如油的AWS上，使用省内存的Nginx服务器应该是个不错的选择，它...]]></description>
				<content:encoded><![CDATA[<p>以前一直使用Apache服务器，但是在内存贵如油的AWS上，使用省内存的Nginx服务器应该是个不错的选择，它能降低我们很多成本。</p>
<p>关于AWS的linux实例安装请参考<a href="http://www.qiais.com/achives/235/" title="在亚马逊AWS上创建EC2的Linux(CentOS)实例" target="_blank">在亚马逊AWS上创建EC2的Linux(CentOS)实例</a></p>
<p>我们分以下五步，完成aws上nginx的架设。</p>
<p>1. 安装mysql<br />
2. 安装nginx<br />
3. 安装php<br />
4. 配置php<br />
5. 配置nginx<br />
6. 测试安装结果</p>
<p>安装必要的库</p>
<pre class="brush: plain; title: ; notranslate">
# cd
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
# rm -rf epel-release-6-8.noarch.rpm
</pre>
<h3>1. 安装mysql</h3>
<p>切换到root用户</p>
<pre class="brush: plain; title: ; notranslate">su</pre>
<p>安装mysql</p>
<pre class="brush: plain; title: ; notranslate"># yum install mysql mysql-server</pre>
<p>初始化mysql，具体参看<a href="http://www.qiais.com/achives/92/" title="在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境" target="_blank">在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境</a>的mysql安装部分。</p>
<h3>1. 安装nginx</h3>
<pre class="brush: plain; title: ; notranslate"># yum install nginx</pre>
<p>启动nginx，并且配置nginx开机启动</p>
<pre class="brush: plain; title: ; notranslate">
# /etc/init.d/nginx start
# chkconfig nginx on
</pre>
<h3>3. 安装php </h3>
<p>安装php及相关php的包</p>
<pre class="brush: plain; title: ; notranslate">
# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-pear php-fpm
</pre>
<h3>4. 配置php</h3>
<pre class="brush: plain; title: ; notranslate"># vi /etc/php.ini</pre>
<p>找到#cgi.fix_pathinfo=1，在下面添加</p>
<pre class="brush: plain; title: ; notranslate">cgi.fix_pathinfo=0</pre>
<h3>5. 配置nginx </h3>
<pre class="brush: plain; title: ; notranslate">vi /etc/nginx/conf.d/default.conf</pre>
<p>更改如下</p>
<pre class="brush: plain; title: ; notranslate">
server {
    listen       80 default_server;
    server_name  _;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        #root   /usr/share/nginx/html;
        root   /var/www/html;
        index  index.php index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        #root   /usr/share/nginx/html;
        root   /var/www/html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        #root   /usr/share/nginx/html;
        root   /var/www/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           /var/www/html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
</pre>
<h3>6. 启动nginx</h3>
<pre class="brush: plain; title: ; notranslate">
# /etc/rc.d/init.d/nginx restart
# chkconfig nginx on
</pre>
<h3>7. 启动php-fpm</h3>
<pre class="brush: plain; title: ; notranslate">
# /etc/rc.d/init.d/php-fpm restart
# chkconfig php-fpm on
</pre>
<h3> 8. 测试安装 </h3>
<p>在/var/www/html中添加info.php,访问 http://********/info.php</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2014/02/2014-03-27-16.22.01.png"><img src="http://www.qiais.com/wp-content/uploads/2014/02/2014-03-27-16.22.01-600x534.png" alt="2014-03-27 16.22.01" width="600" height="534" class="alignnone size-medium wp-image-660" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/430/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Linux(CentOS6)上搭建Apache2+Mysql5+PHP5开发环境</title>
		<link>http://www.qiais.com/achives/92/</link>
		<comments>http://www.qiais.com/achives/92/#comments</comments>
		<pubDate>Thu, 26 Dec 2013 13:57:22 +0000</pubDate>
		<dc:creator><![CDATA[sai]]></dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[网站服务器]]></category>

		<guid isPermaLink="false">http://www.qiais.com/?p=92</guid>
		<description><![CDATA[CentOS安装请阅读安装Centos6服务器 1.从超级用户登录CentOS 2.安装Apache 启动ht...]]></description>
				<content:encoded><![CDATA[<p>CentOS安装请阅读<a href="http://www.qiais.com/?p=75" title="安装Centos6服务器" target="_blank">安装Centos6服务器</a></p>
<h4>1.从超级用户登录CentOS</h4>
<pre class="brush: plain; title: ; toolbar: true; notranslate">
# su -
</pre>
<h4>2.安装Apache</h4>
<pre class="brush: plain; title: ; toolbar: true; notranslate">
# yum install httpd httpd-devel
</pre>
<p><b>启动httpd服务，并设置开机启动</b></p>
<pre class="brush: plain; title: ; notranslate">
# /etc/rc.d/init.d/httpd start
# chkconfig httpd on
</pre>
<h4>3.安装Mysql</h4>
<pre class="brush: plain; title: ; notranslate">
# yum install mysql mysql-server mysql-devel
</pre>
<p><b>启动mysqld服务，并设置开机启动</b></p>
<pre class="brush: plain; title: ; notranslate">
# /etc/rc.d/init.d/mysqld start
# chkconfig mysqld on
</pre>
<p><b>Mysql初始化（通过mysql_secure_installation命令实现）</b></p>
<pre class="brush: plain; title: ; notranslate">
# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):   ←　按enter键（第一次安装的话root密码是空的）
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
New password:            ←　输入新密码
Re-enter new password:   ←　输入新密码（确认）
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y   ←　输入y,按enter键
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y   ←　输入y,按enter键（根据需要，如果允许远程登录的话，输入n）
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]   ←　输入y,按enter键
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] 　←　输入y，按enter键，使设置立即生效
 ... Success!

Cleaning up…

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

</pre>
<h4>4.安装PHP</h4>
<p><b>由于在CentOS中，缺省某些PHP模块，为了方便PHP的使用，我们需要先安装epel包</b></p>
<pre class="brush: plain; title: ; notranslate">
# cd
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
# rm -rf epel-release-6-8.noarch.rpm
# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-pear
</pre>
<h4>5.安装ImageMagick</h4>
<p><b>PHP的应用程序中，很多都会涉及到图片处理，所有安装ImageMagick是很有必要的。安装之前应该先安装gcc和make</b></p>
<pre class="brush: plain; title: ; notranslate">
＃ yum install make
＃ yum install gcc
＃ yum install ImageMagick ImageMagick-devel
＃ pecl install imagick
＃ echo &quot;extension=imagick.so&quot; &gt; /etc/php.d/imagick.ini
</pre>
<h4>6.确认</h4>
<p><b>在/var/www/html中添加test.php文件，test.php内容为：</b></p>
<pre class="brush: plain; title: ; notranslate">
&lt;?php
  phpinfo();
?&gt;
</pre>
<p>访问http://localhost/test.php,你应该能看到类似于以下界面</p>
<p><a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-24-20.33.58.png"><img class="alignnone size-medium wp-image-70" alt="スクリーンショット 2013-11-24 20.33.58" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-24-20.33.58-300x234.png" width="300" height="234" /><br />
</a> <a href="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-24-20.35.05.png"><img class="alignnone size-medium wp-image-71" alt="スクリーンショット 2013-11-24 20.35.05" src="http://www.qiais.com/wp-content/uploads/2013/11/スクリーンショット-2013-11-24-20.35.05-300x229.png" width="300" height="229" /></a></p>
<p><b>结束，谢谢阅读！！</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.qiais.com/achives/92/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
