MySQL Forums
Forum List  »  Install & Repo

load data local infile
Posted by: Jim Sawyer
Date: October 25, 2018 10:45AM

I have been developing a program using version 5.7. I just installed MySQL 8.0 on another computer and am trying to start using it. I am trying to convert some CSV files to MySQL data. On MySQL 5.7 I used the following:

load data local infile 'C:/00_Output/Breeds.csv'
into table Breeds
fields terminated by '!';

This allowed me to convert a field of string numbers ( '1', '2', '23', etc ) into a int(8) field.

MySQL won't allow me to use the word 'local' in the above routine and I asume, as a result, it is much stricter on what data it will convert. If I include the 'local', it gives me the error

ERROR 1148 (42000): The used command is not allowed with this MySQL version

I understand that I can make a change in my.ini (I run Windows 10 pro) such that 'local infile' will be allowed, but I can't seem to learn what change I need to make. I've poured over the reference manual, but can't seem to find it.

For what it's worth, when I enter

mysql> show global variables like 'local_infile'

it shows that local_infile is 'ON'.

I would appreciate your help in making it possible for me to use

load data local infile '...'

with MySQL 8.012.

Jim Sawyer

Options: ReplyQuote

Written By
load data local infile
October 25, 2018 10:45AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.