MySQL Forums
Forum List  »  Newbie

Re: Loading CSV Data with commas
Posted by: Jim Palmer
Date: May 28, 2021 08:47AM

I have been trying all kinds of configuration suggestions and resetting my software, but still not able to run a LOAD DATA command successfully.

I have uninstalled and reinstalled MySQL and MySQLWorkbench.

I have updated secure_file_priv using MySQLWorkbench to contain:

[mysqld]
secure_file_priv = “/mysqlfiles/“

The /private/etc/my.cnf file contains what MySQLWorkbench indicates.

I stopped and started MySQL server

I ran a LOAD DATA INFILE statement and received 1290 error -
08:12:17 LOAD DATA INFILE 'Sample.csv' INTO TABLE finances.MCC_Codes FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' (mcc_code, end_mcc_code, mcc_description) Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 0.0071 sec


Also ran the following statement in both MySQLWorkbench and in terminal:
SELECT @@GLOBAL.secure_file_priv; - this returned “null” in both apps.

So it almost appears that MySQLWorkbench is referring to a my.cnf file that the server doesn’t know about, but other SQL statements executed in MySQLWorkbench run just fine.

I have reached the same result in my futile search for a solution.

Jim P.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

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.