K
K
khodos_dmitry2017-06-12 09:30:16
MySQL
khodos_dmitry, 2017-06-12 09:30:16

How to remove --secure-file-priv in MySQL 5.7?

In my.ini file, I have this line commented out by default. But the error still comes out: The MySQL server is running with the --secure
-file-priv option so it cannot execute this statement

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Axian Ltd., 2017-06-12
@AxianLTD

1. If empty, the variable has no effect. This is not a secure setting.
2. If set to the name of a directory, the server limits import and export operations to work only with files in that directory. The directory must exist; the server will not create it.
3. If set to NULL, the server disables import and export operations. This value is permitted as of MySQL 5.7.6.
Probably correct to set it as secure-file-priv="" or point to some existing directory

B
Boris Korobkov, 2017-06-12
@BorisKorobkov

1. uncomment secure-file-priv and specify folder path as value. Upload files only from this folder
2. Use LOCAL. See https://dev.mysql.com/doc/refman/5.7/en/load-data.html for details

V
vadamlyuk, 2018-05-15
@vadamlyuk

In /etc/my.cnf, in the [mysqld] section, add the line
AND restart mysqld:
service mysqld restart

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question