<?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>Wowebmaster.com &#187; Mysql</title>
	<atom:link href="http://www.wowebmaster.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wowebmaster.com</link>
	<description>World of Webmaster: Sharing Experiences</description>
	<lastBuildDate>Wed, 27 May 2009 10:31:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing MySQL Database Character Set</title>
		<link>http://www.wowebmaster.com/mysql/mysql-character-set-change/</link>
		<comments>http://www.wowebmaster.com/mysql/mysql-character-set-change/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 23:19:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>

		<guid isPermaLink="false">http://www.wowebmaster.com/?p=22</guid>
		<description><![CDATA[MySQL Database Character Set Problem]]></description>
			<content:encoded><![CDATA[<p>You have probably come across with the mysql character set problem, If you are trying to implement a database in a language other than English. You are inserting rows with your text in your language, but you see invalid characters on your database, phpmyadmin mostly.</p>
<p>This is mostly because of character set defined in your mysql database is not proper for your language. This is usually UTF-8 Unicode, and it is default.</p>
<p><strong>Fix:</strong></p>
<p>Changing the charecter set can be done via mysql command line.  Just login to your server via SSH and bring your mysql command line on with following command.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p22code1'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p221"><td class="code" id="p22code1"><pre class="bash" style="font-family:monospace;"> mysql <span style="color: #660033;">-h</span>   <span style="color: #660033;">-D</span>   <span style="color: #660033;">-u</span>   <span style="color: #660033;">-p</span></pre></td></tr></table></div>

<p>Now it will ask you password before giving access to mysql prompt.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p22code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p222"><td class="code" id="p22code2"><pre class="bash" style="font-family:monospace;">ALTER DATABASE wowebmaster DEFAULT CHARACTER SET utf8 COLLATE utf8_turkish_ci \g</pre></td></tr></table></div>

<p>When you get access to mysql command line,  type the above mysql command, it will change the character set of <em>wowebmaster</em> database to utf8_turkish_ci . That&#8217;s it. Replace the database name and the character set for your own modifications.</p>
<p><strong>Update: Changing Table Character Set</strong></p>
<p>If you are looking for changing your table&#8217;s character set, you can use the following command;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p22code3'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p223"><td class="code" id="p22code3"><pre class="bash" style="font-family:monospace;">ALTER TABLE table_name DEFAULT CHARACTER SET utf8 COLLATE utf8_turkish_ci \g</pre></td></tr></table></div>

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fwww.wowebmaster.com%2Fmysql%2Fmysql-character-set-change%2F&amp;linkname=Changing%20MySQL%20Database%20Character%20Set"><img src="http://www.wowebmaster.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.wowebmaster.com/mysql/mysql-character-set-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
