Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Saturday, October 22, 2022

MySQL server is running with the –secure-file-priv [SOLVED]

  how you can solve the error “MySQL server is running with the –secure-file-priv”.
This example is shown in Windows 10 PC.

1. How to see the default MySQL uploads folder.

The error comes because MySQL is limiting the upload file from only one specific folder.

To see the current folder for upload, Just execute the below command after login in to your MySQL command line.

SHOW VARIABLES LIKE "secure_file_priv";

By default the folder will be “C:\ProgramData\MySQL\MySQL Server 8.0\uploads”

2. How to change the default upload folder MySQL.

Locate the my.ini file inside the path “C:\ProgramData\MySQL\MySQL Server 8.0”.
By default programdata folder will be a hidden folder in windows. You will have to opt for View Hidden files option in folder options of windows to see the folder in C drive.

Inside the my.ini file there is a line # Secure File Priv.

You can update the path to any other path as your need.


After saving the file just restart the MySQL service from your PC.

 

No comments:

Post a Comment