mysql ERROR 1300 (HY000): Invalid utf8mb4 character string -
i try import csv file mysql. file containts utf8 data. works when use mysql server 5.5 on centos server, fails when use mysql server 5.7.19 on mac osx computer. (the first line ok, complains on second line)
so, might configuration problem of mysql server on mac osx computer. idea?
mysql> create table tls203_appln_abstr ( appln_id int(11) not null default '0', appln_abstract_lg char(2) collate utf8mb4_unicode_ci not null default '', appln_abstract text collate utf8mb4_unicode_ci, primary key (appln_id) ) engine=myisam default charset=utf8mb4 collate=utf8mb4_unicode_ci avg_row_length=800; mysql> load data infile "/tmp/tls203_part23_sample.txt" table tls203_appln_abstr fields terminated "," optionally enclosed '"' lines terminated '\r\n'; error 1300 (hy000): invalid utf8mb4 character string: '"聚对苯二甲酸乙二醇酯作为锂'
you can download tls203_part23_sample.txt file.
add
character set utf8mb4
between into
, fields
clauses.
Comments
Post a Comment