Programmers learn & share
0 votes
64 views

Problem :

I get mysql error help

the mysql server is running with the --secure-file-priv option so it cannot execute this statement

by (6.9k points)  
edited by | 64 views

1 Answer

0 votes

Solution :

I had faced similar mysql database issue in the past.
Here is what worked for me in Windows 7 to disable secure-file-priv 
  • First you must stop the MySQL server service by going into services.msc.
  • Go to path C:\ProgramData\MySQL\MySQL Server 5.6.
  • Now open the my.ini file in Notepad.
  • Please search for 'secure-file-priv'.
  • Make sure you 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=""
  • Please save the file.
  • Now you can start the MySQL server service by going into services.msc.
by (36.1k points)  
2,187 questions
2,514 answers
59 comments
241 users