<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.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://www.jackxiang.com/post//</link>
<title><![CDATA[Mysql的NO_AUTO_CREATE_USER模式]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[数据库技术]]></category>
<pubDate>Fri, 05 Sep 2014 08:16:41 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：mysql的严格模式有一句：my.cnf加了：sql-mode=&quot;STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&quot;，中间有一个：NO_AUTO_CREATE_USER。<br/>参看：https://jackxiang.com/post/6810/<br/><br/><br/>以前一直使用如下面的语句给mysql服务器添加用户：<br/>grant CREATE, DROP,INSERT, SELECT, DELETE, UPDATE,ALTER on xxx.* to xxx;<br/>grant CREATE, DROP,INSERT, SELECT, DELETE, UPDATE,ALTER on xxx.* to xxx@localhost;<br/>set password for xxx@&#039;%&#039; = password(xxx);<br/>set password for xxx@&#039;localhost&#039; = password(xxx);<br/>flush privileges;<br/><br/>谁知道今天在另一个Mysql服务器上照葫芦画瓢出了问题，抱错说：<br/>ERROR 1133 (42000): Can&#039;t find any matching row in the user table<br/><br/>Google了一下，原来Mysql还有一个模式控制这个，那就是NO_AUTO_CREATE_USER模式。<br/>也就是说，如果在mysql客户端中运行：<br/><br/>mysql&gt; set sql_mode = &#039;no_auto_create_user&#039;;<br/><br/>那么，上述的语句将不能成功，原因是没有提供用户密码，解决的办法是添加一个indentified 子句，例如：<br/><br/>grant CREATE, DROP,INSERT, SELECT, DELETE, UPDATE,ALTER on xxx.* to xxx identified by &#039;xxx&#039;;<br/><br/>另外，要注意的是，空密码是不认的，例如：<br/><br/>grant CREATE, DROP,INSERT, SELECT, DELETE, UPDATE,ALTER on xxx.* to xxx identified by &#039;&#039;; 就不行。<br/><br/>关于服务器模式的详细文档见：<br/><br/>http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Mysql的NO_AUTO_CREATE_USER模式]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>