<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[刘佳的技术日志、博客]]></title> 
<link>http://cnc.52zhe.cn/index.php</link> 
<description><![CDATA[技术的事，喜欢就研究。]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[刘佳的技术日志、博客]]></copyright>
<item>
<link>http://cnc.52zhe.cn/read.php/155.htm</link>
<title><![CDATA[Mysql的一句话问题]]></title> 
<author>kook &lt;admin@yourname.com&gt;</author>
<category><![CDATA[MySQL]]></category>
<pubDate>Mon, 25 Feb 2008 01:12:17 +0000</pubDate> 
<guid>http://cnc.52zhe.cn/read.php/155.htm</guid> 
<description>
<![CDATA[ 
	<div class="code"><br/>1:初始化root密码<br/>mysqladmin -uroot password &quot;initpassword&quot;<br/><br/>2:修改密码<br/>mysql -uroot -p password &quot;newpassword&quot;<br/>Enter password:&#91; enter old password &#93;<br/><br/>3:建用户赋予单个库的任意连接权限<br/>create database newdb;<br/>grant select, insert, update, delete,create,alter,index,drop on newdb.* to &#039;user&#039;@&#039;%&#039; identified by &#039;123456&#039;;<br/>grant all privileges&nbsp;&nbsp;on newdb.* to &#039;user&#039;@&#039;%&#039; identified by &#039;123456&#039;;<br/></div>
]]>
</description>
</item><item>
<link>http://cnc.52zhe.cn/read.php/99.htm</link>
<title><![CDATA[MYSQL字符集的问题。]]></title> 
<author>kook &lt;admin@yourname.com&gt;</author>
<category><![CDATA[MySQL]]></category>
<pubDate>Mon, 24 Sep 2007 09:30:12 +0000</pubDate> 
<guid>http://cnc.52zhe.cn/read.php/99.htm</guid> 
<description>
<![CDATA[ 
	官方文档位置：http://dev.mysql.com/doc/refman/5.1/zh/charset.html<br/><br/>一：版本问题<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>mysql4.1开始引入多语言支持,所以查看一下版本吧。<br/>root@ubuntu606:~# mysql -V<br/>mysql &nbsp;Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (i486) using readline 5.1<br/>lucifer@debian:/var/www/owl$ mysql -V<br/>mysql &nbsp;Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i486) using readline 5.2<br/></div></div><br/><br/>二：字符集相关参数<br/><div class="code"><br/>默认情况下：<br/>mysql&gt; show variables;<br/>........................<br/>&#124; character_set_client &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_connection &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_database &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_results &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124; latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_server &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_system &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; collation_connection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1_swedish_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>&#124; collation_database &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1_swedish_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>&#124; collation_server &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; latin1_swedish_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>........................<br/>修改后：<br/>mysql&gt; show variables;<br/>........................<br/>&#124; character_set_client &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_connection &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_database &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_results &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_server &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; character_set_system &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124;<br/>&#124; collation_connection &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8_general_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>&#124; collation_database &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8_general_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>&#124; collation_server &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#124; utf8_general_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#124;<br/>......<br/></div><br/>需要查看这9个参数的意义。自己找去吧。我也不知道去哪里找，反正一google就大堆。<br/><br/>三：修改指的是修改/etc/mysql/my.cnf，反正就是你mysql的配置文件。<br/><div class="code"><br/>分别在client配置区和mysqld配置区<br/>里面加入：<br/>default-character-set &nbsp; = &nbsp; &nbsp; &nbsp; utf8<br/>然后保证连接的程序为utf8，就不会错了。<br/>配置区域如下：<br/>&#91;mysqld&#93;<br/>&#91;client&#93;<br/><br/>需要注意的是，服务器端的字符区域设定不是在&#91;mysql.server&#93;这个区域里面的。在使用RHEL5的过程中发现。<br/></div><br/>
]]>
</description>
</item>
</channel>
</rss>