MySQL Forums
Forum List  »  General

Re: Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
Posted by: JK Heydt
Date: August 25, 2020 06:15AM

Here are the results of the three statements"

show local variables like 'local_infile';

Result:
# Variable_name, Value
'local_infile', 'ON'

show global variables like 'local_infile';

Result:
# Variable_name, Value
'local_infile', 'ON'


show variables like 'secure_file_priv';

Result:
# Variable_name, Value
'secure_file_priv', 'C:\\ProgramData\\MySQL\\MySQL Server 8.0\\Uploads\\'


Where is the server?

Answer:
On a Windows 10 PC

Why do you need 'local'?

Answer:
I don't know. I saw it in an example I found on the Internet.

When I take it out:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\trn_cd.tsv' INTO TABLE hto_demo.`pricing & routing - trn_cd`
IGNORE 1 ROWS;

I get this error:

"Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement"

When I put it in:
LOAD DATA LOCAL INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\trn_cd.tsv' INTO TABLE hto_demo.`pricing & routing - trn_cd`
IGNORE 1 ROWS;

I get this error:

"Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server sides"

Thank you for taking the time to help me. I really appreciate it.

Options: ReplyQuote


Subject
Written By
Posted
Re: Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
August 25, 2020 06:15AM


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.