I’m trying to use LOAD DATA with the below command to import CSV files into a managed DO droplet via MySQL Workbench because the Workbench wizard is incredibly slow.
LOAD DATA
LOCAL INFILE 'C:\...Path...\May22 P2B.csv'
INTO TABLE May22B.tbl_packages2buy
Running the above gets me ‘error 3948 loading local data is disabled’. So how can I enable loading local data you ask? I found this answer (https://stackoverflow.com/questions/59993844/error-loading-local-data-is-disabled-this-must-be-enabled-on-both-the-client) with a possible solution. But I’ve tried running SET GLOBAL local_infile=1 and I just get error code 1227. access denied you need (at least one of) the super privilege(s) for this operation.
So how can I get loading local data enabled, so I can use LOAD DATA and load my CSV into Workbench/my Database? or is there another fast way to access my database?
Any suggestions would be much appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Try setting it from MySQL command line to check local_infile is set or not login to MySQL using username and password and try the following command
SHOW GLOBAL VARIABLES LIKE 'local_infile';
if the local_infile value if false set it to true by using the following
SET GLOBAL local_infile = true;
for more info refer https://dev.mysql.com/doc/refman/8.0/en/load-data-local-security.html https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.