Database
2017.03.30 01:18
[mysql] 쿼리 실행시 ERROR 1366 (HY000) : incorrect string value : for column
조회 수 8985 댓글 3
MySQL 쿼리에 한글이 포함됐을 때 이런 오류가 나는 경우가 있다.
# 오류 내용
mysql> ERROR 1366 (HY000): Incorrect string value: '\xEB\xB2\x88 \xED\x94...' for column 'memo' at row 1
# 해결 방법
1. /etc/my.cnf 파일을 수정 (다음 내용을 추가)
[mysqld]
. . .
default-character-set=utf8
default-collation=utf8_general_ci
. . .
2. database, table character set 수정
mysql> ALTER TABLE table_name convert to charset utf8;
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
2 | Database | [mysql] ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. | hooni | 2017.12.15 | 1400 |
» | Database | [mysql] 쿼리 실행시 ERROR 1366 (HY000) : incorrect string value : for column 3 | hooni | 2017.03.30 | 8985 |