I'm pretty new to SQL, MySQL and Docker. I'm running a Docker MySQL container (I believe).
My problem:
In MySQL, the command
select * from [tablename] into outfile [csv-filename];
fails with the message
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
What I've tried:
select @@GLOBAL.secure_file_priv;
outputs a value of NULL.
Then, I changed/added the line
secure_file_priv= "/home/"
into both of the following files within the container:
- /etc/mysql/my.cnf
- /etc/mysql/conf.d/docker.cnf
Still, "select @@GLOBAL.secure_file_priv;" in MySQL returns NULL and "(...) into outfile (...);" fails as described above.
Any clues are much appreciated!