I have this code to upload CSV files into MySQL, I tried to upload the CSV files I created, but I keep getting this error when I run the code.
The code I'm trying to run is here:
Load Data Local Infile
'/Users/dylanpowell/Dropbox/Dylan Powell/Berkeley Investment Advisors/Dylans Stock Evaluations/Bottom Scores at 9-7-19.csv'
Into Table Stock_Evaluator_Raw_Scores
Fields Terminated by ','
Enclosed by '"'
Escaped by '\\'
Lines terminated by '\n'
Ignore 1 Lines;
The error is below:
Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server side. Load Data Local Infile '/Users/dylanpowell/Dropbox/Dylan Powell/Berkeley Investment Advisors/Dylans Stock Evaluations/Bottom Scores at 9-7-19.csv'Into Table Stock_Evaluator_Raw_Scores Fields Terminated by ','Enclosed by '"' Escaped by '\\'Lines terminated by '\n' Ignore 1 Lines;
I noticed there was another stack overflow for this issue, but I'm not sure how to implement those methods to get my code to run.
Open MYSQL Command Line
Type in your password
Enter the following:
SHOW GLOBAL VARIABLES LIKE 'local_infile';
If local_infile value is equal to false set it to true by:
SET GLOBAL local_infile = true;
More info here: https://www.digitalocean.com/community/questions/how-to-enable-local-capability-in-mysql-workbench