<?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; Errcode: 13</title>
	<atom:link href="http://www.sou5.cn/archives/tag/errcode-13/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sou5.cn</link>
	<description>Web 2.0 网站架构、优化 数据库架构</description>
	<lastBuildDate>Sun, 05 Feb 2012 16:21:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>都是selinux惹的祸</title>
		<link>http://www.sou5.cn/archives/831.html</link>
		<comments>http://www.sou5.cn/archives/831.html#comments</comments>
		<pubDate>Sun, 25 Jul 2010 07:30:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[原创]]></category>
		<category><![CDATA[Errcode: 13]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://www.sou5.cn/?p=831</guid>
		<description><![CDATA[今天装了一个虚拟机，在服务器上装mysql 想把数据库目录改变一下修改完/etc/my.cnf 和/etc/init.d/mysqld
重启mysql　出现错误:
100725 23:09:50  mysqld ended
100725 23:22:44  mysqld started
100725 23:22:44 [Warning] Can&#8217;t create test file /Data/mysql_db/mysql/localhost.lower-test
100725 23:22:44 [Warning] Can&#8217;t create test file /Data/mysql_db/mysql/localhost.lower-test
/usr/libexec/mysqld: Can&#8217;t change dir to &#8216;/Data/mysql_db/mysql/&#8217; (Errcode: 13)
100725 23:22:44 [ERROR] Aborting
100725 23:22:44 [Note] /usr/libexec/mysqld: Shutdown complete
看几遍配置没错呀，又看看权限也没错呀，为什么说没有权限而报错呢，　然后google了一下　原来是selinux问题
修改/etc/selinux/config
将 SELINUX=enforcing或permissive改成disabled
然后reboot
问题解决:)
另外修改my.cnf里面的数据库路径时，要加上
[mysql]
socket=/Data/mysql_db/mysql/mysql.sock
设定mysql的mysql.sock文件路径不然连接时会出
 ERROR 2002 (HY000): Can&#8217;t connect to local MySQL server through socket &#8216;/var/lib/mysql/mysql.sock&#8217; (2)
错误
相关：
什么是SELinux 
也可以
使用setenforce [...]]]></description>
		<wfw:commentRss>http://www.sou5.cn/archives/831.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

