Question

I am using MySQL workbench to create database from EER diagram (forward engineering), and want to load data from a text file to my table

load data infile 'c:\\actors.txt' ignore into table actors field terminated by '\t';

the file contains European characters. I have tried utf16,utf8,latin1,latin2 character sets for my database but still receiving error incorrect string value '\xE4vel'. I have dropped schema and created each time with different character set (all tables have correct collate according to character set). my os is windows7 64bit if it makes any difference! any one can help me. thanks

Was it helpful?

Solution 2

I managed to fix it , it seems that workbench (at least in my case) does not define charset and collate of each column in tables as it is defined in the database and you should do it manually!! for example if you set your database charset latin1 and collate latin1_swedish_ci each field in each table still remains empty of charset and collate , I had to go 1 by 1 to my tables and set the columns charset ! I dont know if it is the problem of forward engineering or what ? any way it solved

OTHER TIPS

Have you tried using

LOAD DATA LOCAL INFILE?

Also, I don't know what is with the random Ignore after your file location.

For instance, you would just add the word LOCAL after Data, and take out the ignore. Try this:

LOAD DATA LOCAL INFILE 'c:\\actors.txt' into table actors field terminated by '\t';
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top