<?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_LOAD_DATA权限设置]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Fri, 06 May 2011 01:44:26 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	Mysql版本号：<br/>mysql&gt; select version();<br/>+------------+<br/>&#124; version()&nbsp;&nbsp;&#124;<br/>+------------+<br/>&#124; 5.0.26-log &#124; <br/>+------------+<br/>配置：<br/>vi /etc/my.cnf <br/>有一行：<br/>local-infile=1<br/>但是导入DB的时候就是不行：<br/><textarea name="code" class="html" rows="15" cols="100">
mysql&gt; load data local infile &#039;/data/ichongai/Tbl_New_Code27.txt&#039;&nbsp;&nbsp;into table Tbl_New_Code27 (FCodes);
ERROR 1148 (42000): The used command is not allowed with this MySQL version
</textarea><br/>最后解决方法：<br/><textarea name="code" class="html" rows="15" cols="100">
mysql --local-infile=1
</textarea><br/>导入OK！<br/>反过来证明其配置可能有问题。<br/>具体原因待查，估计得从show variables入手思路：<br/><textarea name="code" class="html" rows="15" cols="100">
mysql --local-infile=1 
mysql&gt; show variables like &#039;%infile%&#039;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+---------------+-------+
&#124; Variable_name &#124; Value &#124;
+---------------+-------+
&#124; local_infile&nbsp;&nbsp;&#124; ON&nbsp;&nbsp;&nbsp;&nbsp;&#124; 
+---------------+-------+
1 row in set (0.00 sec)
</textarea><br/>不加参数：<br/><textarea name="code" class="html" rows="15" cols="100">
mysql
mysql&gt; show variables like &#039;%infile%&#039;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+---------------+-------+
&#124; Variable_name &#124; Value &#124;
+---------------+-------+
&#124; local_infile&nbsp;&nbsp;&#124; ON&nbsp;&nbsp;&nbsp;&nbsp;&#124; 
+---------------+-------+
1 row in set (0.00 sec)
</textarea><br/><br/>一样的，奇怪了！！！<br/>Mysql手册摘抄：<br/>你可以用--local-infile=0选项启动mysqld从服务器端禁用所有LOAD DATA LOCAL命令。<br/> 对于mysql命令行客户端，可以通过指定--local-infile[=1]选项启用LOAD DATA LOCAL，或通过--local-infile=0选项禁用。类似地，对于mysqlimport，--local or -L选项启用本地数据文件装载。在任何情况下，成功进行本地装载需要服务器启用相关选项。<br/> 如果你使用LOAD DATA LOCAL Perl脚本或其它读选项文件中的[client]组的程序，你可以在组内添加local-infile=1选项。但是，为了便面不理解local-infile的程序产生问题，则规定使用loose- prefix：<br/>·[client]<br/>·loose-local-infile=1<br/>·如果LOAD DATA LOCAL INFILE在服务器或客户端被禁用，试图执行该语句的客户端将收到下面的错误消息：<br/>ERROR 1148: The used command is not&nbsp;&nbsp;allowed with this MySQL version<br/><br/>参考来源：<br/>http://wenku.baidu.com/view/4b93ac10f18583d0496459a0.html
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] MySQL_LOAD_DATA权限设置]]></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>