setting secure_file_priv and datadir
Posted by: bill leebong
Date: May 15, 2016 05:10PM


I need to change the directory of secure_file_priv to, or to include /var/www/html/.

1. Can you have more than one output directory at the same time?

The docs say that you can change this from the command line but I've not had any success with it. Have tried [SET, " "] [secure_file_priv, --secure_file_priv, -secure_file_priv] = ['/var/www/html/', /var/www/html/] from bash and the mysql prompt in a teminal in what I thought was every combination possible.

Also in the docs it says the first config file read is etc/my.cnf which does not exist, next is etc/mysql/my.cnf but that file is a link that goes to another link that goes back to mysql.mysql.conf.d.

2. What is the right syntax to use and from where?

3. Could I make a my.cnf file, fix the permissions, toss it into the etc dir and have it work? Again I have no idea of the proper code to use to do that. maybe secure_file_priv = /var/www/html ?

Really don't want to blow the install up. For even more fun, Ubuntu has apparmor, which means that even if I got it right on the MySQL end, it probably isn't going to work until that gets sorted out.

Was also thinking that aren't you going to have to change the datadir, in /etc//mysql/mysql.conf.d/mysqld.cnf on my ubuntu system. Using mysql 5.7.12.
I need to do SELECT INTO OUTFILE to a web directory in order to allow users of a web app to output and then download the results from queries as a CSV file.

4. Would you need to change both the secure_file_priv and the datadir to output to a new directory?

Thanks in advance


Options: ReplyQuote

Written By
setting secure_file_priv and datadir
May 15, 2016 05:10PM

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.