[MySQL] ERROR 1366 (HY000) at line 1: Incorrect string value:
[MySQL] ERROR 1366 (HY000) at line 1: Incorrect string value:
MySQL workbench의 "Data Import"를 수행하면서 위와 같은 오류가 발생할 경우....
21:00:53 Restoring D:\MyWork\OpenAPI_공공API\국립중앙의료원\응급의료기관_정보_20180719.sql
Running: mysql.exe --defaults-extra-file="c:\users\invuso~1\appdata\local\temp\tmpyedu2i.cnf" --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=safeme < "D:\\MyWork\\OpenAPI_공공API\\국립중앙의료원\\응급의료기관_정보_20180719.sql"
ERROR 1366 (HY000) at line 1: Incorrect string value: '\xB0\xE6\xC8\xF1\xB4\xEB...' for column 'dutyName' at row 1
Operation failed with exitcode 1
21:00:53 Import of D:\MyWork\OpenAPI_공공API\국립중앙의료원\응급의료기관_정보_20180719.sql has finished with 1 errors
Data Import를 하기 위한 sql 파일의 Encoding Type이 어떤지를 확인해보면 ANSI로 되어있었음.
UTF-8로 Encoding Type을 바꿔서 저장한 후
다시 MySQL의 Data Import를 해주면 정상적으로 처리됨.