Here is what worked for me in Windows 7 to disable secure-file-priv
(Option #2 from vhu's answer):
- Stop the MySQL server service by going into
services.msc
.
- Go to
C:\ProgramData\MySQL\MySQL Server 5.6
(ProgramData
was a hidden folder in my case).
- Open the
my.ini
file in Notepad.
- Search for 'secure-file-priv'.
- Comment the line out by adding '#' at the start of the line. For MySQL Server 5.7.16 and above, commenting won't work. You have to set it to an empty string like this one -
secure-file-priv=""
- Save the file.
- Start the MySQL server service by going into
services.msc
.