mysql charset 변경

기존 데이터베이스 charset 변경

ALTER DATABASE test DEFAULT CHARACTER SET utf8;

mysql 환경에서 charset 변경

[client]
default-character-set = utf8

[mysqld]
init_connect = SET collation_connection = utf8_unicode_ci
init_connect = SET NAMES utf8
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_unicode_ci
skip-character-set-client-handshake //클라이언트 설정 무시(모든게 utf8 인데도 깨진다면 이걸 설정)

/* 저장후 service mysqld restart 해주고 난뒤 다시한번 show variables~~~~를 이용해서 확인해보도록 하자.
utf8 로 잘 나온다면 DB설정은 끝 */
//2010.9.8 추가 내용 –> [mysql] 부분과 [mysqldump] 부분에도 default-character-set = utf8 추가

참조

  • http://ceomk.tistory.com/47

Leave a Reply

Your email address will not be published. Required fields are marked *