How to set phpMyAdmin to use utf8

In your mf.cnf file:

default-character-set = utf8    
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

#try uncommenting these if you have problems



And I have this in my file for phpMyAdmin:

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['DefaultCharset'] = 'utf_8';
$cfg['DefaultConnectionCollation'] = 'utf8_general_ci';
$cfg['Lang']     = 'en-utf-8';

To verify, run this command:

show variables like "%character%";show variables like "%collation%";

collation_connection        latin1_swedish_ci
collation_database      utf8_unicode_ci
collation_server        utf8_unicode_ci

It does not really matter what the collation_connection shows up as. This has no bearing on how the mysql commands are run. If it is not utf8 that is fine.

Tip: Just make sure that your DATABASE’s coalitions are also set to utf8 (utf8_general_ci), in phpMyAdmin – then tables you create inside the database will have that coallation too.

Related Posts:

  • No Related Posts
This entry was posted in Web Development and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *