이정민
이정민

Reputation: 3

MySQL Workbench8: Enable LOAD DATA LOCAL INFILE(with error code : 3948)

I want to load csv file into mysql local server table.

I tried to using 'LOAD DATA LOCAL INFILE' in mysqlworkbench 8.0. but, the following error occurs continuously.

Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server sizes 0.000 sec.

Here's the solution I've tried.
1. Insert "local_infile =1" into My.ini file
2. Insert "local_infile=1" into the advanced-other window when connecting to SQL
3. Modify file path in secure_file_priv of My.ini file

Well, nothing works.
What should we do?


[Entered Code]
LOAD DATA LOCAL INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\TR_2019.csv'
INTO TABLE data.tr_base
CHARACTER SET uf8
FIELDS TERMINATED BY ''
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;

enter image description here

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 3750

Answers (2)

haas
haas

Reputation: 1

The problem is that when trying to open Workbench by default it tries to load the generated locales for the English language, so it crashes when not finding them. To solve it, you only need to do the following steps:

1 - open the file 2 - Uncomment the English line UTF-8 similar to this: # en_US.UTF-8 UTF-8 3 - Save the file 4 - Run sudo locale-gen in the terminal 5 - Close the Workbench and reopen it and that's it

Upvotes: 0

Isaac Osafo
Isaac Osafo

Reputation: 11

For anyone else who is stuck on the same problem, I followed the same suggestions as in the attached files in the problem statement but realized that the added line should be:

local-infile=1 not local_infile=1.

And be sure to restart your MySQL server for the changes to persist.

Upvotes: 1

Related Questions