This forum is no longer active. Please post your questions to our new community site

Forums LAMPStack

How can I enable the utf-8 in mysql?

Subscribe to How can I enable the utf-8 in mysql? 2 post(s), 2 voice(s)

 
Avatar xeoshow 1 post

hello, dear all
I am new to bitnami, and just installed the lampstack (suse 10.2 64bit), looks very good.
Just one problem: Seems the default character encoding of mysql is not utf-8? How can I change the default to utf-8? Which file should I modify?
Thanks a lot.

 
Avatar victoria Administrator 134 post(s)

Hi,

You can add that option in the /mysql/my.cnf. In the [mysqld] section add ’’character-set-server=UTF8"; in the [client] section add “default-character-set=UTF8”.

You can find more information in these links:

http://dev.mysql.com/doc/refman/5.1/en/charset-… http://dev.mysql.com/doc/refman/5.0/en/server-o…

If you need to conver existing data, you can execute:

ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;
Forums LAMPStack