<?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.osyunwei.com/archives/category/config/database/mysql/feed" rel="self" type="application/rss+xml" />
	<link>https://www.osyunwei.com</link>
	<description>国产化OS/AnolisOS/openEuler/RHEL/CentOS/Rocky Linux/Debian/Ubuntu Linux FreeBSD 服务器教程 &#124; Windows Server 2003/2008/2012/2016/2019/2022/2025服务器教程</description>
	<lastBuildDate>Wed, 01 Apr 2026 08:27:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux系统安装部署 MySQL-9.3.0 Innovation创新版本</title>
		<link>https://www.osyunwei.com/archives/15867.html</link>
		<comments>https://www.osyunwei.com/archives/15867.html#comments</comments>
		<pubDate>Mon, 16 Jun 2025 04:23:03 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=15867</guid>
		<description><![CDATA[操作系统：AnolisOS-8.10 mysql版本：mysql-9.3.0-linux-glibc2.28-x86_64.tar.xz 准备篇 1、关闭SELINUX #AnolisOS-8.10默认是关闭的，可以不用操作 vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 2、开启防火墙 系统默认使用的是firewall作为防火墙，这里改为iptables防火墙。 开启mysql默认端口3306 2.1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2.2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/15867.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/15867.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux系统安装部署 MySQL-5.7.44版本</title>
		<link>https://www.osyunwei.com/archives/15853.html</link>
		<comments>https://www.osyunwei.com/archives/15853.html#comments</comments>
		<pubDate>Fri, 13 Jun 2025 08:54:04 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=15853</guid>
		<description><![CDATA[操作系统：AnolisOS-8.10 mysql版本：mysql-5.7.44-linux-glibc2.12-x86_64.tar.gz 准备篇 1、关闭SELINUX #AnolisOS-8.10默认是关闭的，可以不用操作 vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 2、开启防火墙 系统默认使用的是firewall作为防火墙，这里改为iptables防火墙。 开启mysql默认端口3306 2.1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2.2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/15853.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/15853.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux系统安装部署 MySQL-8.4.5 LTS版本</title>
		<link>https://www.osyunwei.com/archives/15839.html</link>
		<comments>https://www.osyunwei.com/archives/15839.html#comments</comments>
		<pubDate>Thu, 12 Jun 2025 10:33:32 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=15839</guid>
		<description><![CDATA[操作系统：AnolisOS-8.10 mysql版本：mysql-8.4.5-linux-glibc2.28-x86_64.tar.xz 准备篇 1、关闭SELINUX #AnolisOS-8.10默认是关闭的，可以不用操作 vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! #保存退出 setenforce 0 #使配置立即生效 2、开启防火墙 系统默认使用的是firewall作为防火墙，这里改为iptables防火墙。 开启mysql默认端口3306 2.1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2.2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/15839.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/15839.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下MySQL主从同步小版本升级</title>
		<link>https://www.osyunwei.com/archives/12982.html</link>
		<comments>https://www.osyunwei.com/archives/12982.html#comments</comments>
		<pubDate>Fri, 02 Sep 2022 07:06:53 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12982</guid>
		<description><![CDATA[操作系统：CentOS 7.x MySQL二进制版本：5.7.x 小版本升级 现有版本：MySQL 5.7.38 升级后版本：MySQL 5.7.39 下载地址：https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz 上传mysql-5.7.39-linux-glibc2.12-x86_64.tar.gz到/usr/local/src 升级前先查看MySQL 5.7.x 中添加、弃用或删除的变量和选项 https://dev.mysql.com/doc/refman/5.7/en/added-deprecated-removed.html ############################################ MySQL 8.0.x版本可以使用mysql-shell进行升级前的检查 mysql-shell-8.0.29-linux-glibc2.12-x86-64bit.tar.gz https://cdn.mysql.com/archives/mysql-shell/mysql-shell-8.0.29-linux-glibc2.12-x86-64bit.tar.gz tar zxvf /usr/local/src/mysql-shell-8.0.29-linux-glibc2.12-x86-64bit.tar.gz -C /usr/local/ cd /usr/local mv mysql-shell-8.0.29-linux-glibc2.12-x86-64bit mysql-shell cd /usr/local/mysql-shell/bin ./mysqlsh -- util checkForServerUpgrade root@localhost:3306 --target-version=5.7.39 --output-format=JSON --config-path=/data/server/mysql/my.cnf ############################################ 使用离线方式进行升级 一、主库操作 1、进入mysql控制台 set global innodb_fast_shutdown=0; #保障数据的完整性 flush tables with read lock; #数据库只读锁定命令，防止导出数据库的时候有数据写入（命令执行期间控制台不能关闭，控制台关闭命令就自动失效了，unlock tables;#解除锁定） set [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12982.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12982.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 8.x下二进制mysql5.5.x/5.6.x/5.7.x/8.0.x多版本共存</title>
		<link>https://www.osyunwei.com/archives/12005.html</link>
		<comments>https://www.osyunwei.com/archives/12005.html#comments</comments>
		<pubDate>Tue, 09 Nov 2021 03:09:26 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=12005</guid>
		<description><![CDATA[准备篇 一、防火墙配置 #防火墙请根据个人需求进行选择和设置，下面以iptables防火墙为例 CentOS 8.x默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/12005.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/12005.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 8.x安装MySQL 8.x并创建数据库添加用户对用户进行授权</title>
		<link>https://www.osyunwei.com/archives/10312.html</link>
		<comments>https://www.osyunwei.com/archives/10312.html#comments</comments>
		<pubDate>Mon, 30 Sep 2019 08:41:00 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10312</guid>
		<description><![CDATA[本文CentOS版本：CentOS 8.0.1905 MySQL版本：mysql-8.0.18 前传： CentOS 8.0.1905系统安装配置图解教程 https://www.osyunwei.com/archives/10256.html 准备篇 一、防火墙配置 CentOS 从7.x开始默认使用的是firewall作为防火墙，这里改为iptables防火墙。 1、关闭firewall： systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl mask firewalld systemctl stop firewalld yum remove firewalld 2、安装iptables防火墙 yum install iptables-services #安装 vi /etc/sysconfig/iptables #编辑防火墙配置文件，开发mysql默认端口3306 # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10312.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10312.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL5.7版本下创建数据库添加用户并对用户进行授权</title>
		<link>https://www.osyunwei.com/archives/10146.html</link>
		<comments>https://www.osyunwei.com/archives/10146.html#comments</comments>
		<pubDate>Wed, 19 Jun 2019 10:10:48 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10146</guid>
		<description><![CDATA[遇到问题：按照MySQL5.6版本之前的语句对MySQL5.7版本执行创建数据库、添加用户并对用户授权操作后，有可能该授权用户只能连接到数据库，但是执行不了任何操作，更是创建不了数据表。 解决问题：通过测试，发现在MySQL5.7版本中，可能要授权用户对所有数据库有SUPER权限，否则可能该授权用户只能连接数据库并不能执行任何操作。 数据库名称：mydb 数据库用户名：mydbuser 数据库密码：123456 Create DATABASE IF NOT EXISTS mydb default charset utf8 COLLATE utf8_general_ci; #创建数据库 #MySQL5.7版本建议先创建用户，再给用户进行授权操作。 CREATE USER 'mydbuser'@'localhost' IDENTIFIED BY '123456'; #创建用户 CREATE USER 'mydbuser'@'127.0.0.1' IDENTIFIED BY '123456'; GRANT ALL PRIVILEGES ON mydb.* TO mydbuser@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION; #授权用户 GRANT ALL PRIVILEGES ON mydb.* TO mydbuser@'127.0.0.1' IDENTIFIED BY '123456' [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10146.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10146.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL5.7版本sql_mode=only_full_group_by问题解决办法</title>
		<link>https://www.osyunwei.com/archives/10120.html</link>
		<comments>https://www.osyunwei.com/archives/10120.html#comments</comments>
		<pubDate>Mon, 30 Apr 2018 15:43:56 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">https://www.osyunwei.com/?p=10120</guid>
		<description><![CDATA[问题： MySQL数据库迁移到MySQL5.7版本后，出现如下报错： 原因分析：MySQL5.7版本默认设置了 mysql sql_mode = only_full_group_by 属性，导致报错。 解决办法： 1、打开MySQL数据库控制台 执行全局sql语句： set   @@sql_mode= 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; 或者 SET GLOBAL  sql_mode= 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; 如果只修改某一个数据库，请在该数据库下面执行： sql_mode= 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; 2、修改MySQL配置文件 Linux下my.cnf或Windows下My.ini 注意在[mysqld]段下添加，直接加到最后一行无效。 添加以下代码： sql_mode= STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 添加完成后，重新启动MySQL服务，MySQL报错消失。 至此，MySQL5.7版本sql_mode=only_full_group_by问题解决。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/10120.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » MySQL5.7版本sql_mode=only_full_group_by问题解决办法<p><a rel="bookmark" href="https://www.osyunwei.com/archives/10120.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/10120.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自动清理MySQL binlog日志</title>
		<link>https://www.osyunwei.com/archives/9732.html</link>
		<comments>https://www.osyunwei.com/archives/9732.html#comments</comments>
		<pubDate>Sat, 08 Oct 2016 07:53:15 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[binlog]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9732</guid>
		<description><![CDATA[说明： 开启MySQL binlog日志的服务器，如果不设置自动清理日志，默认binlog日志一直保留着，时间一长，服务器磁盘空间被binlog日志占满，导致MySQL数据库出错。 使用下面方法可以安全清理binlog日志 一、没有主从同步的情况下清理日志 mysql -uroot -p123456 -e 'PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ),INTERVAL 5 DAY)'; #mysql 定时清理5天前的binlog mysql -u root -p  #进入mysql 控制台 reset master;  #重置binlog 二、MySQL主从同步下安全清理binlog日志 1、mysql  -u root -p   #进入从服务器mysql控制台 show slave status\G;   #检查从服务器正在读取哪个日志，有多个从服务器，选择时间最早的一个做为目标日志。 2、进入主服务器mysql控制台 show master log;   #获得主服务器上的一系列日志 PURGE MASTER LOGS TO 'binlog.000058';   #删除binlog.000005之前的，不包括binlog.000058 PURGE MASTER LOGS [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9732.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9732.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL数据库InnoDB引擎下服务器断电数据恢复</title>
		<link>https://www.osyunwei.com/archives/9204.html</link>
		<comments>https://www.osyunwei.com/archives/9204.html#comments</comments>
		<pubDate>Sun, 02 Aug 2015 10:10:04 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[数据库]]></category>
		<category><![CDATA[数据恢复]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9204</guid>
		<description><![CDATA[说明： 线上的一台MySQL数据库服务器突然断电，造成系统故障无法启动，重新安装系统后，找到之前的MySQL数据库文件夹。 问题： 通过复制文件的方式对之前的MySQL数据库进行恢复，发现在程序调用时找不到数据库中的表，造成网站无法正常访问。 分析： 1、MySQL数据库，使用拷贝文件方式来恢复数据库，只支持MyISAM引擎； 2、如果有数据库或数据表使用了InnoDB引擎，恢复的时候，必须连同MySQL数据库目录下的ibdata1文件一起拷贝过来。 解决办法： 1、停止MySQL服务 service mysqld stop 2、找之前的备份数据库文件 cd /home/mysql_bak/mysql/ #进入MySQL备份目录 ibdata1 #需要此文件 3、拷贝ibdata1文件到数据库相应目录 cp /home/mysql_bak/mysql/ibdata1 /usr/local/mysql/data/ibdata1 #拷贝文件到现在的数据库目录 chown mysql.mysql /usr/local/mysql/data/ibdata1 #设置权限为mysql用户和用户组 rm /usr/local/mysql/data/ib_logfile0 #删除现有日志文件，否则启动MySQL失败 rm /usr/local/mysql/data/ib_logfile1 #删除现有日志文件，否则启动MySQL失败 系统运维 www.osyunwei.com 温馨提醒：系统运维原创内容©版权所有,转载请注明出处及原文链接 4、启动MySQL service mysqld start 故障解决 此时页面已正常打开。 ibdata1作用：InnoDB引擎下的表数据文件。 建议：数据库一定要做好备份，恢复数据最好使用.sql备份文件导入。 至此，MySQL数据库InnoDB引擎下服务器断电数据恢复教程完成。 &#160;&#160;&#160;&#160;&#160;» 本文链接：https://www.osyunwei.com/archives/9204.html» 订阅本站：https://www.osyunwei.com/feed» 转载请注明来源：系统运维 » MySQL数据库InnoDB引擎下服务器断电数据恢复<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9204.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9204.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改MySQL数据库字符编码为UTF-8解决中文乱码</title>
		<link>https://www.osyunwei.com/archives/9178.html</link>
		<comments>https://www.osyunwei.com/archives/9178.html#comments</comments>
		<pubDate>Fri, 24 Jul 2015 06:31:38 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=9178</guid>
		<description><![CDATA[问题： 由于MySQL编码原因会导致数据库出现乱码。 解决办法： 修改MySQL数据库字符编码为UTF-8，UTF-8包含全世界所有国家需要用到的字符,是国际编码。 具体操作： 1、进入MySQL控制台 mysql -uroot -p #输入密码进入 status; #查看当前MySQL运行状态，如下图所示： 系统运维  www.osyunwei.com  温馨提醒：系统运维原创内容©版权所有,转载请注明出处及原文链接 Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 默认客户端和服务器端都用了latin1编码，所以会出现乱码。 2、修改mysql配置文件 vi /etc/my.cnf #在[client]段增加下面代码 default-character-set=utf8 #在[mysqld]段增加下面的代码 default-storage-engine=INNODB character-set-server=utf8 collation-server=utf8_general_ci :wq! #保存退出 3、service mysqld restart #重启MySQL 再次进入MySQL控制台查看,如下图所示： Server characterset: utf8 Db characterset: utf8 Client characterset: utf8 Conn. characterset: [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/9178.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/9178.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下MySQL慢查询分析mysqlsla安装使用</title>
		<link>https://www.osyunwei.com/archives/7659.html</link>
		<comments>https://www.osyunwei.com/archives/7659.html#comments</comments>
		<pubDate>Tue, 27 May 2014 02:57:22 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqlsla]]></category>
		<category><![CDATA[慢查询]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7659</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.X 64位 MySQL版本：mysql-5.5.35 MySQL配置文件：/etc/my.cnf MySQL 数据库存放目录：/data/mysql 实现目的：开启MySQL慢查询日志功能，安装使用MySQL慢查询分析mysqlsla 具体操作： 一、开启MySQL慢查询功能 mysql -u  root -p  #进入MySQL控制台 show variables like '%slow%';   #查看MySQL慢查询是否开启 set global slow_query_log=ON;   #开启MySQL慢查询功能 show variables like "long_query_time";  #查看MySQL慢查询时间设置，默认10秒 set global long_query_time=5;  #修改为记录5秒内的查询 select sleep(6);  #测试MySQL慢查询 show variables like "%slow%";  #查看MySQL慢查询日志路径 show global status like '%slow%';  #查看MySQL慢查询状态 系统运维  www.osyunwei.com  温馨提醒：qihang01原创内容©版权所有,转载请注明出处及原文链 exit;  #退出MySQL控制台 cat /data/mysql/127-slow.log  [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7659.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7659.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下MySQL主从同步监控shell脚本</title>
		<link>https://www.osyunwei.com/archives/7240.html</link>
		<comments>https://www.osyunwei.com/archives/7240.html#comments</comments>
		<pubDate>Tue, 21 Jan 2014 03:18:38 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[主从同步]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=7240</guid>
		<description><![CDATA[说明： 操作系统：CentOS 目的：定时监控MySQL主从数据库是否同步，如果不同步，记录故障时间，并执行命令使主从恢复同步状态 1、创建脚本文件 vi /home/crontab/check_mysql_slave.sh   #编辑，添加下面代码 #!/bin/sh # check_mysql_slave status # author www.osyunwei.com ip=eth0  #网卡名称 mysql_binfile=/usr/local/mysql/bin/mysql mysql_user=root  #MySQL数据库账号 mysql_pass=123456  #密码 mysql_sockfile=/tmp/mysql.sock datetime=`date +"%Y-%m-%d/%H:%M:%S"`   #获取当前时间 mysql_slave_logfile=/home/logs/check_mysql_slave.log   #日志文件路径，必须提前创建好 slave_ip=`ifconfig $ip&#124;grep "inet addr" &#124; awk -F[:" "]+ '{print $4}'` status=$($mysql_binfile -u$mysql_user -p$mysql_pass -S $mysql_sockfile -e "show slave status\G" &#124; grep -i "running") Slave_IO_Running=`echo $status &#124; [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/7240.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/7240.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 5.9编译安装配置mysql-5.6.10</title>
		<link>https://www.osyunwei.com/archives/5970.html</link>
		<comments>https://www.osyunwei.com/archives/5970.html#comments</comments>
		<pubDate>Fri, 12 Apr 2013 11:37:00 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5970</guid>
		<description><![CDATA[说明： 操作系统：CentOS 5.9 64位 MySQL版本：mysql-5.6.10 MySQL安装目录：/usr/local/mysql MySQL数据库存放目录：/data/mysql 准备篇： 一、配置好IP、DNS 、网关，确保使用远程连接工具能够连接服务器，服务器yum命令可以正常使用 二、配置防火墙，开启3306端口 vi /etc/sysconfig/iptables  #编辑 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT  #允许3306端口通过防火墙 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 特别提示：很多网友把这两条规则添加到防火墙配置的最后一行，导致防火墙启动失败，正确的应该是添加到默认的22端口这条规则的下面 添加好之后防火墙规则如下所示： ********************************************************************************** # Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5970.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5970.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Windows Server 2008 R2下修改MySQL 5.5数据库目录</title>
		<link>https://www.osyunwei.com/archives/5150.html</link>
		<comments>https://www.osyunwei.com/archives/5150.html#comments</comments>
		<pubDate>Thu, 16 Aug 2012 05:54:19 +0000</pubDate>
		<dc:creator>qihang01</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>
		<category><![CDATA[修改MySQL数据库目录]]></category>

		<guid isPermaLink="false">http://www.osyunwei.com/?p=5150</guid>
		<description><![CDATA[说明： 操作系统：Windows Server 2008 R2 MySQL版本：5.5.25a MySQL程序安装目录：D:\Program Files\MySQL\MySQL Server 5.5 MySQL数据库默认目录：C:\ProgramData\MySQL\MySQL Server 5.5\data\ 需求：修改MySQL数据库目录为D:\Program Files\MySQL\MySQL Server 5.5\data 具体操作： 一、停止MySQL 开始-cmd net stop mysql55 二、复制原来数据库目录到新目录 1、备份D:\Program Files\MySQL\MySQL Server 5.5\中的data目录为data-bak 2、复制C:\ProgramData\MySQL\MySQL Server 5.5\中的data目录到 D:\Program Files\MySQL\MySQL Server 5.5\目录下 系统运维 www.osyunwei.com 温馨提醒：qihang01原创内容版权所有,转载请注明出处及原文链接 三、修改MySQL配置文件 1、用记事本打开C:\ProgramData\MySQL\MySQL Server 5.5\data\目录下的my.ini 找到datadir="C:\ProgramData\MySQL\MySQL Server 5.5\data" 在前面加#注释掉 在下面添加一行 datadir="D:\Program Files\MySQL\MySQL Server 5.5\data" 修改完成后，保存退出。 2、复制C:\Documents and Settings\All [...]<p><a rel="bookmark" href="https://www.osyunwei.com/archives/5150.html" target="_blank">查看全文</a></p>]]></description>
		<wfw:commentRss>https://www.osyunwei.com/archives/5150.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
