0

I'm trying to run a LOAD DATA LOCAL INFILE from a file on my C:\ drive into an existent table, logged at root in Workbench. I've researched it all afternoon, set local_infile=1, set secure_file_priv='', granted file access to my user, flushed privileges, tried forward and backslashes but can't seem to get round the problem. Error 2068 doesn't really tell you much in the manual either. Any other suggestions?

I'm running on Windows 10, latest MySQL versions (as of last week - its a fresh install) and the table I'm trying to insert into is really simple. Its clearly a permissions problem, but running as root on a windows instance where I'm admin surely shouldn't be a problem?

Code is "LOAD DATA LOCAL INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/filename.csv' INTO TABLE tablename;

double-beep
  • 5,031
  • 17
  • 33
  • 41
PhilC
  • 23
  • 1
  • 7
  • try enabling it https://stackoverflow.com/questions/10762239/mysql-enable-load-data-local-infile – nbk Sep 07 '20 at 17:56
  • The issue was the use of "LOCAL", the file was both local to my client and my server, removed the LOCAL and it works (well gets a different error to do with the data, which I'll have a go at next). Thanks for your help – PhilC Sep 07 '20 at 18:15
  • try to re Edit the question to allow other to read it easily and then answer to you – AAEM Sep 08 '20 at 14:50

1 Answers1

0

You should check that folder where the file you are trying to load is and confirm that you have the necessary permissions. If you have the permissions for the folder then check the file. You should used the properties options by right clicking on the folder or on the file.

Properties Window

EDIT: Also try the instruction with only LOAD DATA INFILE without the LOCAL statement. That made it worked for me.