将CSV格式数据导入 mysql,报错:
load data infile 'f:/nmg.csv' into table nmg fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
报错:Invalid utf8mb4 character string: '"'
解决方法:新建一个gbk编码的数据库,然后新建一个gbk编码的表,在进行导入即可。
2024-02-24 15:12:04
将CSV格式数据导入 mysql,报错:
load data infile 'f:/nmg.csv' into table nmg fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
报错:Invalid utf8mb4 character string: '"'
解决方法:新建一个gbk编码的数据库,然后新建一个gbk编码的表,在进行导入即可。