<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Configuring MySQL to use UTF-8</title>
	<atom:link href="http://cameronyule.com/2008/07/configuring-mysql-to-use-utf-8/feed" rel="self" type="application/rss+xml" />
	<link>http://cameronyule.com/2008/07/configuring-mysql-to-use-utf-8</link>
	<description>Glasgow based new media developer Cameron Yule.</description>
	<pubDate>Fri, 21 Nov 2008 13:07:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Cameron</title>
		<link>http://cameronyule.com/2008/07/configuring-mysql-to-use-utf-8#comment-196</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Wed, 24 Sep 2008 10:55:47 +0000</pubDate>
		<guid isPermaLink="false">http://cameronyule.com/?p=56#comment-196</guid>
		<description>Hi Enrico, it looks as if the line:

init-connect='SET NAMES utf8'

is not being executed - is this definitely in your my.cnf?

From the MySQL command prompt, try this to check it's working;
&lt;pre lang="bash"&gt;
mysql&gt; show variables like 'init%';
+---------------+----------------+
&#124; Variable_name &#124; Value          &#124;
+---------------+----------------+
&#124; init_connect  &#124; SET NAMES utf8 &#124; 
&#124; init_file     &#124;                &#124; 
&#124; init_slave    &#124;                &#124; 
+---------------+----------------+
3 rows in set (0.00 sec)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Enrico, it looks as if the line:</p>
<p>init-connect=&#8217;SET NAMES utf8&#8242;</p>
<p>is not being executed - is this definitely in your my.cnf?</p>
<p>From the MySQL command prompt, try this to check it&#8217;s working;</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">mysql<span style="color: #000000; font-weight: bold;">&gt;</span> show variables like <span style="color: #ff0000;">'init%'</span>;
+---------------+----------------+
| Variable_name | Value          |
+---------------+----------------+
| init_connect  | SET NAMES utf8 | 
| init_file     |                | 
| init_slave    |                | 
+---------------+----------------+
<span style="color: #000000;">3</span> rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Enrico</title>
		<link>http://cameronyule.com/2008/07/configuring-mysql-to-use-utf-8#comment-194</link>
		<dc:creator>Enrico</dc:creator>
		<pubDate>Mon, 22 Sep 2008 17:07:02 +0000</pubDate>
		<guid isPermaLink="false">http://cameronyule.com/?p=56#comment-194</guid>
		<description>Hi,
thanks for sharing this meaningful example of how to manage databases and charsets.
I tried what you say here, and I got this strange "limbo" solution:
&lt;pre lang="bash"&gt;
mysql&gt; SHOW VARIABLES LIKE 'collation%';
+----------------------+-------------------+
&#124; Variable_name        &#124; Value             &#124;
+----------------------+-------------------+
&#124; collation_connection &#124; latin1_swedish_ci &#124;
&#124; collation_database   &#124; utf8_general_ci   &#124;
&#124; collation_server     &#124; utf8_general_ci   &#124;
+----------------------+-------------------+
3 rows in set (0.00 sec)
&lt;/pre&gt;
&lt;pre lang="bash"&gt;
mysql&gt; SHOW VARIABLES LIKE 'character_set%';
+--------------------------+----------------------------+
&#124; Variable_name            &#124; Value                      &#124;
+--------------------------+----------------------------+
&#124; character_set_client     &#124; latin1                     &#124;
&#124; character_set_connection &#124; latin1                     &#124;
&#124; character_set_database   &#124; utf8                       &#124;
&#124; character_set_filesystem &#124; binary                     &#124;
&#124; character_set_results    &#124; latin1                     &#124;
&#124; character_set_server     &#124; utf8                       &#124;
&#124; character_set_system     &#124; utf8                       &#124;
&#124; character_sets_dir       &#124; /usr/share/mysql/charsets/ &#124;
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
&lt;/pre&gt;
Oh, and
Your MySQL connection id is 6836 to server version: 5.0.27
just to take into account different versions of mysql.

Now what can you think should I do?

Bye,
Enrico</description>
		<content:encoded><![CDATA[<p>Hi,<br />
thanks for sharing this meaningful example of how to manage databases and charsets.<br />
I tried what you say here, and I got this strange &#8220;limbo&#8221; solution:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">mysql<span style="color: #000000; font-weight: bold;">&gt;</span> SHOW VARIABLES LIKE <span style="color: #ff0000;">'collation%'</span>;
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database   | utf8_general_ci   |
| collation_server     | utf8_general_ci   |
+----------------------+-------------------+
<span style="color: #000000;">3</span> rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">mysql<span style="color: #000000; font-weight: bold;">&gt;</span> SHOW VARIABLES LIKE <span style="color: #ff0000;">'character_set%'</span>;
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>charsets<span style="color: #000000; font-weight: bold;">/</span> |
+--------------------------+----------------------------+
<span style="color: #000000;">8</span> rows <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">0.00</span> sec<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Oh, and<br />
Your MySQL connection id is 6836 to server version: 5.0.27<br />
just to take into account different versions of mysql.</p>
<p>Now what can you think should I do?</p>
<p>Bye,<br />
Enrico</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.321 seconds -->
<!-- Cached page served by WP-Cache -->
