I am encountering a similar problem to this, in that I cannot export to a file, but is not a duplicate as I am not asking how to fix that problem, but to find where the variables are set.
When I run 'mysqld --verbose --help', secure-file-priv is ONLY set to null. And it does read:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
BUT this does not seem to be the actual config, but the default. I installed with homebrew.
I tried many of the provided solutions, but that variable just seems to not change after I make a change and then stop, start servers.
What I have tried:
adding 'secure-file-priv = ""'
/usr/local/Cellar/mysql/5.7.16/mysql-test/suite/federated/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_memcache/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_ddl/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_binlog/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_big/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndbcluster/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_team/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/ndb_rpl/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/rpl_ndb/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/rpl/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/suite/rpl/extension/bhs/my.cnf /usr/local/Cellar/mysql/5.7.16/mysql-test/include/default_my.cnf
I have set that same item to an actual location. Still shows as NULL.
I have edited mysqld.cnf to have the same settings.
I have edited com.oracle.oss.mysql.mysqld.plist to have that setting (I am on Mac El Capitain)
I think my next step is to uninstall and reinstall, but would prefer not to.