The result is that when you try to import a CSV file into a MySQL table, the following error occurs:
"The MySQL server is running with the--SECURE-FILE-PRIV option so it cannot execute this statement"
Baidu a bit, the reasons given are:
MySQL new feature secure_file_priv the effect on read-write files, this switch defaults to NULL, that is, import and export is not allowed.
The workarounds are:
Under Windows: Modify My.ini Add Secure_file_priv in [mysqld] =
Under Linux: Modify MY.CNF add Secure_file_priv in [mysqld] =
Then restart MySQL, then query Secure_file_priv
Then I installed the MySQL server5.7 located in the C-disk directory C:\Program Files\mysql\mysql Server 5.7 did not find My.ini, only My-default.ini, try to my-default.ini the [ MYSQLD] under Add Secure_file_priv =, does not work, and finally found that the possible solution is:
Summarize:
(1) Mysql5.7 Modify the mysql5.7 installation directory My-default.ini discovery does not work, you need to modify the My.ini configuration file under C:\ProgramData\MySQL\MySQL Server 5.7 ( MySQL default read My.ini configuration file under C:\ProgramData\MySQL\MySQL Server 5.7)
(2) My-default.ini can also be copied a copy of the file name to My.ini, and then in My.ini [mysqld] Add secure_file_priv =. or modify the configuration in C:\ProgramData\MySQL\MySQL Server 5.7\my.ini
Permissions Issue reference : http://www.cnblogs.com/qlqwjy/p/7989293.html
MySQL server5.7 can not find My.ini, only My-default.ini