santa_claus_rpm: (Default)
mysqldump --default-character-set=latin1 --result-file=db1.sql db1

cat db1.sql | replace "CHARSET=latin1" "CHARSET=utf8" > db2.sql

cat db2.sql | replace "SET NAMES latin1" "SET NAMES utf8" > db3.sql


/etc/my.cnf :
------------------------------------
[mysqld]
default-character-set = utf8
default-collation=utf8_unicode_ci

[mysql]
default-character-set = utf8
------------------------------------

service mysqld restart

mysql> drop database db1;
mysql> create database db1 charset='utf8';

mysql -u root db1 < db3.sql

Profile

santa_claus_rpm: (Default)
santa_claus_rpm

October 2011

S M T W T F S
      1
2345678
9101112 131415
16171819202122
23242526 272829
3031     

Syndicate

RSS Atom

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 26th, 2017 09:45 pm
Powered by Dreamwidth Studios