Can't load CSVs
Hello world, I am a graduate student in bioinformatics taking my first SQL class so please be nice if this is a naive question :)
Sorry, this post is probably way too much info but I wasn't sure what to include. The tl;dr is I can't resolve errors 1290, 3948, 2068, and 1045
I am creating a database from large data sets, tsvs over a million lines. I've converted some of them to csvs in Python in case that was the issue even though I doubted it from the error messages. I can load csvs in using the GUIs if the csvs are small enough, under 50k lines, but it doesn't seem like a good solution. I can also load data manually with INSERT statements, but again, not reasonable for this size data set.
Some system information that may or may not be relevant:
- I'm on a mac running Sequoia 15.2
- I'm going back and forth between MySQL Workbench and phpMyAdmin via web browser launched my MAMP
- Running SQL version 8.0.40
This is what happens when I run on a local database I created on my computer:
LOAD DATA LOCAL INFILE "/path/file.csv"
INTO TABLE whatever FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server sides
LOAD DATA INFILE "/path/file.csv"
INTO TABLE whatever FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
Then I tried creating a cloud database in AWS (I'm a newbie at AWS too but I'm trying) and I get these for those same commands:
Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.
Error Code: 1045. Access denied for user 'admin'@'%' (using password: YES)
Some of the things I've tried:
- Basically any permissions I can find in either GUI, I grant all
- In MySQL workbench, I can find the options file /etc/my.conf and try editing it there. In there I ran:
[mysqld]
local-infile=1
[client]
local-infile=1
- When I try to navigate to the options file of the AWS database using Workbench, it says "Feature requires remote host access" which I'm not sure what to do about
- Since I can see evidence of /etc/my.conf in Workbench, I'm pretty sure it exists on my computer but I can't find it anywhere with Finder
- AWS version that gives the password error I ran: select user, host from mysql.user;. Says rds_superuser_role
I've spent hours googling and trying things so I would really appreciate any help anyone can give. I've been corresponding with my TA over email and he's stumped so far. He uses a PC and cannot replicate my errors.
Subject
Written By
Posted
Can't load CSVs
April 03, 2025 03:20PM
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.