• Register
0 votes
204 views

Problem :

I get mysql error help

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

6 5 3
6,930 points

Please log in or register to answer this question.

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.
9 7 4
38,600 points

Related questions

0 votes
1 answer 741 views
741 views
Problem : I am facing a strange MySQL error may be it is related to the database's read-only flag. The Web application that is using the MySQL is running on Debian 7.9. It was running well but suddenly started attempting to access the application powered website ... - SQLSTATE[HY000]: General error: 1290 The MySQL server is running with the --read-only option so it cannot execute this statement
asked Nov 20, 2019 peterlaw 6.9k points
0 votes
1 answer 182 views
182 views
Problem : I am very new to the Linux but want to set up my MySQL databases on the Amazon ec2 instance. I have followed some directions I found about resetting a user login pass by using a --skip-grant-tables option of the MySQL. Now I want to add my user ... HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement How can I turn above option off?
asked Jan 30, 2020 jwilliam 3.9k points
0 votes
2 answers 7 views
7 views
Problem: Currently I am working on php project. The project main theme is to login through ssh to some cisco switch in my local network , fetch details and populate it to user. To accomplish this I have created on database in MySQL consisting switch login ... question is that how can I securely store the switch credentials in my MySQL database to make it secure from any security vulnerabilities.
asked Apr 26 Yeamin 22k points
0 votes
1 answer 107 views
107 views
Problem: I am interested in learning MySQL. Currently I am facing the following error if I tried to add the index to my table using the MySQL Workbench: “Error Code: 2013. Lost connection to MySQL server during query.” I also noticed that above error appears only when I try to run long query. I want to know the away to increase my timeout value?
asked Jul 27, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 2 views
2 views
Problem: How I can fix this issue > Could not connect to the mysql service. please check the config file.
asked 2 days ago ummeshani 10.8k points
0 votes
1 answer 8 views
8 views
Problem: Why I got this error: why cannot insert data into mysql database php? ny idea on what I need to fix this. I am new in c++. Thanks in advance.
asked Mar 13 jasimchaudary 1.5k points
0 votes
1 answer 67 views
67 views
Problem: failed to connect to mysql at 127.0.0.1:3306 with user root.
asked Feb 16 charles mathews 5.5k points
0 votes
1 answer 28 views
28 views
Is there any PHP code that demonstrate on how to query my database and gives me the list using the “select” tag. And when I select any name from the list the form will retrieve the data and allows me to update the information and then update the information when I’m done? Thanks in advance.
asked Oct 25, 2020 azriel 590 points
0 votes
1 answer 21 views
21 views
I need to import xlsx file into mysql database applying PHP.
asked Sep 25, 2020 Daniel Anderson 4k points
0 votes
1 answer 4 views
4 views
Problem: Is anyone available to assist me and resolve this issue > What is the statement to show column names and settings of a table called mytable?
asked Apr 26 ummeshani 10.8k points