<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[解决方法]MySql提示:The server quit without updating PID file(…)失败]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[数据库技术]]></category>
<pubDate>Wed, 21 Dec 2016 03:32:27 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	我的这种是因为Mysql正在运行，然后又启动时会出现这个问题，直接pkill -9 mysql:<br/><textarea name="code" class="php" rows="15" cols="100">
TASK [mysql : 多实例-启动多实例 mysql] *************************************************
failed: [10.71.182.226] (item=3317) =&gt; &#123;&quot;failed&quot;: true, &quot;item&quot;: 3317, &quot;msg&quot;: &quot;Starting MySQL.....................................................................................................The server quit without updating PID file (/usr/local/mysql/var/mysql3317.pid).[FAILED]&#92;r&#92;n&quot;&#125;


failed: [10.71.182.226] (item=3318) =&gt; &#123;&quot;failed&quot;: true, &quot;item&quot;: 3318, &quot;msg&quot;: &quot;Starting MySQL.....................................................................................................The server quit without updating PID file (/usr/local/mysql/var/mysql3318.pid).[FAILED]&#92;r&#92;n&quot;&#125;
failed: [10.71.182.226] (item=3319) =&gt; &#123;&quot;failed&quot;: true, &quot;item&quot;: 3319, &quot;msg&quot;: &quot;Starting MySQL.....................................................................................................The server quit without updating PID file (/usr/local/mysql/var/mysql3319.pid).[FAILED]&#92;r&#92;n&quot;&#125;
</textarea><br/>手工运行：<br/><textarea name="code" class="php" rows="15" cols="100">
[root@iZ88adlqaedZ ~]# service mysqld3317 start
Starting MySQL.....................................................................................................The server quit without updating PID file (/usr/local/[FAILED]r/mysql3317.pid).
</textarea><br/><br/><br/>服务器症状：<br/>今天网站web页面提交内容到数据库，发现出错了，一直提交不了，数找了下原因，发现数据写不进去！第一反应，重启mysql数据库，一直执行中，停止不了也启动不了，直觉告诉我磁盘满了 ！用df命令查了下，果然磁盘满了，因为当时分区采用系统默认，不知道为什么不能自动扩容！以后在处理这个问题！如图所示：<br/><br/>[root@rekfan ~]# df<br/>文件系统&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1K-块&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;已用&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可用 已用% 挂载点<br/>/dev/mapper/vg_rekfan-lv_root<br/>51606140&nbsp;&nbsp;47734848&nbsp;&nbsp; 1249852&nbsp;&nbsp;100%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<br/>tmpfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1953396&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;88&nbsp;&nbsp; 1953308&nbsp;&nbsp; 1%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /dev/shm<br/>/dev/sda1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 495844&nbsp;&nbsp;&nbsp;&nbsp; 37062&nbsp;&nbsp;&nbsp;&nbsp;433182&nbsp;&nbsp; 8%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/boot<br/>/dev/mapper/vg_rekfan-lv_home<br/>229694676&nbsp;&nbsp;&nbsp;&nbsp;191796 217835016&nbsp;&nbsp; 1%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /home<br/>[root@rekfan ~]#<br/>删除了些没用的日志后，重新启动数据库还是出错。http://blog.rekfan.com/?p=186<br/><br/>[root@rekfan mysql]# service mysql restart<br/>MySQL server PID file could not be found![失败]<br/>Starting MySQL...The server quit without updating PID file (/usr/local/mysql/data/rekfan.pid).[失败]<br/>google了下 ，问题可能的原因有多种，具体什么原因最好的办法是先查看下错误日志：<br/><br/>1.可能是/usr/local/mysql/data/rekfan.pid文件没有写的权限<br/>解决方法 ：给予权限，执行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data”&nbsp;&nbsp;然后重新启动mysqld！<br/><br/>2.可能进程里已经存在mysql进程<br/>解决方法：用命令“ps -ef&#124;grep mysqld”查看是否有mysqld进程，如果有使用“kill -9&nbsp;&nbsp;进程号”杀死，然后重新启动mysqld！<br/><br/>3.可能是第二次在机器上安装mysql，有残余数据影响了服务的启动。<br/>解决方法：去mysql的数据目录/data看看，如果存在mysql-bin.index，就赶快把它删除掉吧，它就是罪魁祸首了。本人就是使用第三条方法解决的 ！http://blog.rekfan.com/?p=186<br/><br/>4.mysql在启动时没有指定配置文件时会使用/etc/my.cnf配置文件，请打开这个文件查看在[mysqld]节下有没有指定数据目录(datadir)。<br/>解决方法：请在[mysqld]下设置这一行：datadir = /usr/local/mysql/data<br/><br/>5.skip-federated字段问题<br/>解决方法：检查一下/etc/my.cnf文件中有没有没被注释掉的skip-federated字段，如果有就立即注释掉吧。<br/><br/>6.错误日志目录不存在<br/>解决方法：使用“chown” “chmod”命令赋予mysql所有者及权限<br/><br/>7.selinux惹的祸，如果是centos系统，默认会开启selinux<br/>解决方法：关闭它，打开/etc/selinux/config，把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试。<br/><br/><br/>来自：http://blog.rekfan.com/articles/186.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [解决方法]MySql提示:The server quit without updating PID file(…)失败]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>