我遇到類似的問題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)
我想我的下一個步驟是卸載後重新安裝,但寧願不要。