아함. 그놈의 디폴트값 utf8 때문에 이런 개고생을 다들 하시네요.
여튼 mysql 5.5 기준의 조치 방법을 알려드리겠습니다..( __ )
우선 mysql 설치경로를 찾아가시면 my.ini 파일이 있습니다.
mysql.ini 를 실행하세요.
빨간색 값을 파란색 값으로 바꾸세요.
[mysql]
default-character-set=utf8
default-character-set=euckr
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative
to this.
basedir="C:/Program Files/MySQL/MySQL Server 5.5/"
#Path to the database root
datadir="C:/Documents and Settings/All
Users/Application Data/MySQL/MySQL Server 5.5/Data/"
# The default character set that will be used when a new schema or table
is
# created and no character set is defined
character-set-server=utf8
character-set-server=euckr
mysql을 실행하고 select문을 실행시키면 여전히 한글이 깨진 상태로 표시가 됩니다.
그러나 이것은 utf8 set일 때 저장해 놓은 것이라서 euckr set일 때도 깨지거나 뀃쉙퀙 등으로 나옵니다.
따라서 data값들을 모두 삭제후 새로 저장해 주어야 합니다.
쓩쓩슝 ~ 새로 입력합니다.
그리고 출력~!
자자 한글이 잘 나오지요 ?
추가적으로 설명을 하자면,
mysql.ini 는 server측 character set을 한 것이고,
지금 실행한 mysql인 client측 설정은 set names euckr; 를 하면 됩니다.