0

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!

theotherreceive
  • 8,235
  • 1
  • 30
  • 44
Weiwei
  • 367
  • 1
  • 5
  • 10

1 Answers1

2

in /etc/my.cnf

default-character-set=utf8

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;
quaie
  • 1,124
  • 6
  • 13