我遇到类似的问题this,因为我不能导出到一个文件,但不是重复的,因为我不问如何解决这个问题,而是找到变量的设置。哪里可以找到mysql启动变量的设置位置?
当我运行'mysqld --verbose --help'时,secure-file-priv只设置为null。它确实如下:
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
但是这似乎并不是实际的配置,而是默认值。我安装了自制软件。
我尝试了很多提供的解决方案,但该变量似乎没有改变,然后停止,启动服务器。
我曾尝试:
加入 '安全文件私法= “”'
/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
我已将相同的项目设置为实际位置。仍然显示为NULL。
我编辑了mysqld.cnf以具有相同的设置。
我已经编辑com.oracle.oss.mysql.mysqld.plist有,设置(我在Mac上的El Capitain)
我想我的下一个步骤是卸载后重新安装,但宁愿不要。