삽질은 나의 힘 | [MySQL] Charset 관련 [ UTF8 , euckr ]
삽질은 나의 힘 위치로그  |  태그  |  미디어로그  |  방명록
icon [MySQL] Charset 관련 [ UTF8 , euckr ]
TroubleShooting | 2010. 12. 29. 15:22

server default charset은 euckr이고, table 생성시 charset을 utf8로 생성한 경우,

table에 utf8형태로 table에 data를 정상적으로 넣으려면,

client에서 server로 접속시 아래의 변수들을 고려해야한다.


- SET NAMES 'charset_name' [COLLATE 'collation_name']

=> 아래의 3개 변수 수정과 동일


SET character_set_client = x;
SET character_set_results = x;
SET character_set_connection = x;


- SET CHARACTER SET charset_name

=> 아래의 3개 변수 수정과 동일

SET character_set_client = x;
SET character_set_results = x;
SET collation_connection = @@collation_database;


[ reference ]

http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html


arrow 트랙백 | 댓글



관리자  |   글쓰기
BLOG main image
분류 전체보기 (27)
Server (4)
Network (3)
Packet Analysis (3)
Security (3)
TroubleShooting (8)
Algorithm (1)
ETC (2)
None (1)
Total :
Today :
Yesterday :
rss
위치로그 : 태그 : 방명록 : 관리자
minSoong-e's Blog is powered by Daum / Designed by plyfly.net