MySQL Forums
Forum List  »  Security

Re: Secure File Privilege
Posted by: Mike Demaris
Date: August 18, 2022 12:34PM

the secure_file_priv variable is read only, can only be changed via the my.ini file.

see the following for latest testing
Local server, local client:
secure file priv: default server 8.0 folder
connection options:
opt_local_infile=1 -- this does not set the local_infile var on start up.

local_infile=1 -- set manually
OS login: admin rights
Server permissions: all

export to default folder works.
cannot import with LOAD DATA INFILE from default folder: server is running with secure file
priv option.


Local server, local client:
secure file priv: my document folder
connection options:
opt_local_infile=1 -- this does not set the local_infile var on start up.

local_infile=1 -- set manually
OS login: admin rights
Server permissions: all

export to default folder does not work.
cannot create/write to file...permission denied.


set secure file priv to "".

load local infile:
Here is where it looks for files now:
C:\ProgramData\MySQL\MySQL Server 8.0\Data\inv

Current Error: data too long for column... col is varchar(100)
import data sample:

(I removed the header, thinking that was the cause...)
1,"1"
2,"2"
3,"3"
4,"4"
5,"5"
6,"6"
7,"7"
8,"8"
9,"9"


Code:
LOAD DATA INFILE 'aisle.csv'
INTO TABLE aisle
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;

Options: ReplyQuote


Subject
Views
Written By
Posted
593
February 22, 2022 12:17PM
339
February 22, 2022 12:39PM
310
February 22, 2022 01:00PM
308
February 22, 2022 01:03PM
292
February 22, 2022 01:41PM
377
February 22, 2022 03:16PM
296
February 22, 2022 05:09PM
334
February 26, 2022 03:34AM
Re: Secure File Privilege
325
August 18, 2022 12:34PM
225
August 18, 2022 10:47PM
219
August 19, 2022 10:22AM
226
August 19, 2022 11:54AM


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.