1. Modify the character encoding and modify it all to GBK.
like ' %char% ' ; set character_set_database=GBK;
Among them, Character_set_client is the client-side encoding method, Character_set_connection is used for establishing the connection encoding; character_set_database database encoding; character_set_ Results the encoding of the result set; the encoding of the Character_set_server database server; As long as the above four uses the same encoding method, there will be no garbled problem.
2. Create a database
CREATE SCHEMA ' Kingdee ';
3. Create a table
CREATE TABLE' Kingdee '. ' t0803 ' (' Fproductid ' )VARCHAR( -)NULL, ' Fproductver 'VARCHAR( -)NULL, ' Fproductregno 'VARCHAR( -)NULL, ' Faccountname 'VARCHAR( $)NULL, ' Faccountuser 'VARCHAR( -)NULL, ' Fysuser 'VARCHAR( -)NULL, ' Fadditionalinfo 'VARCHAR( -)NULL, ' Findustry 'VARCHAR( -)NULL, ' fbusiness 'VARCHAR( -)NULL, ' Ffunctionkey 'VARCHAR( -)NULL, ' Foperationcount 'DECIMAL(Ten,0)NULL, ' Foperationday 'DECIMAL( -,0)NULL, ' FIP 'VARCHAR( +)NULL, ' fsenddate 'TIMESTAMP not NULL DEFAULT Current_timestamp, ' Fappvisitpos 'DECIMAL(4,0)NULL, ' Fversioninfo 'VARCHAR( -)NULL, ' Fuserrole 'VARCHAR( -)NULL, ' Fserveradditionalinfo 'VARCHAR( Max)NULL);
3. Import data
load data local infile "D:/Kingdee/intoTABLEby' | ';
4. See if the imported data is garbled or not
Select * from 5;
5. If garbled, delete the table
Drop TABLE t0803;
TXT import MySQL