Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I only have utf8 characters to put into my db so like everything in the db is utf8.

I tried 'yum install mysql mysql-server -with-charset=utf8' but it is not right.

if i install using ''yum install mysql mysql-server' i got defaut latin1 charset.

Any suggestion and help are much appreciated!

share|improve this question
up vote 2 down vote accepted

in /etc/my.cnf


if you will use only this charset

for databases already created which use latin1 charset, do the following

alter database database_name charset=utf8;

for each table:

alter table table_name charset=utf8;

for each varchar/char type column:

alter table table_name alter column column_name charset=utf8;
share|improve this answer
Restart mysql server after change in /etc/my.cnf – lg. Sep 1 '09 at 8:54
that goes without saying :) though I should have mentioned it, for a complete answer thanks – petre Sep 1 '09 at 10:30

Your Answer


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.