Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am installing MySQL server on FreeBSD. My current port version is 5.5.15 on FreeBSD 7.2.

I am wondering how to get it installed with different than latin1 default charset and collation.

Currently when I install it with default Makefile I get this:

| character_set_client     | latin1
| character_set_connection | latin1
| character_set_database   | latin1
| character_set_filesystem | binary
| character_set_results    | latin1
| character_set_server     | latin1
| character_set_system     | latin1
| character_sets_dir       | /usr/local/share/mysql/charsets/
| collation_connection     | latin1_swedish_ci
| collation_database       | latin1_swedish_ci
| collation_server         | latin1_swedish_ci

I can't understand why latin1 is the default charset in the first place, but well, probably not the best place to discuss it.

Anyway... I'd like to change the default charsets to utf8 and collation to utf8_unicode_ci.

I tried changing Makefile and added following lines to CMAKE_ARGS:

-DWITH_CHARSET="utf8" \
-DWITH_COLLATION="utf8_unicode_ci"

All that got changed was character_set_system to utf8.

How do I change all of those? Could be a compilation param (preferrably) or my.cnf setting.

Will appreciate any help.

share|improve this question

2 Answers 2

Go ahead and install with the wrong defaults, and later change the settings when creating a /etc/my.cnf file.

[mysqld]
collation-server = utf8_general_ci
character-set-server = utf8
share|improve this answer
    
This is not enough unfortunately. –  Michal M Dec 16 '11 at 10:39
    
The question is about MySQL charset and collation and this answers the actual question. –  s3v3n Mar 28 '13 at 9:42
up vote 1 down vote accepted

This website below explains is quite well.

http://rentzsch.tumblr.com/post/9133498042/howto-use-utf-8-throughout-your-web-stack

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.