Tal Kohavy
Tal Kohavy

Reputation: 609

How to solve Error 1148 from MySql workbench and not cmd?

I am running the following statement to import data:

LOAD DATA LOCAL INFILE     'C:\\Users\\talkohavy\\Desktop\\MySQL_data\\categories.csv'
INTO TABLE BI_EX_OLTP.categories 
FIELDS TERMINATED BY ','
IGNORE 1 LINES;

And then I get this error:

error code 1148. the used command is not allowed with this mysql version.

How can I enable loading local data using the MySql Workbench and not the cmd?

Upvotes: 2

Views: 6651

Answers (2)

Huanfa Chen
Huanfa Chen

Reputation: 617

This solution works for version 8.0.18:

In the advanced tab of the connection, put OPT_LOCAL_INFILE=1 in the others box.

setting_MySQL_workbench

Upvotes: 9

Bob Dankert
Bob Dankert

Reputation: 68

I believe this is an issue with the new versions of Workbench (having the same issue in Workbench 8.0.12). I did not have this issue in the 5.7.x version of Workbench, and downgrading to this version has fixed the issue for me.

This bug is documented here: https://bugs.mysql.com/bug.php?id=91891

I recommend either downgrading to an older version of Workbench, or using a different means to execute the command (such as through the mysql CLI command, or using another tool to connect such as DataGrip, etc).

Upvotes: 5

Related Questions