Press enter to see results or esc to cancel.

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

In this video I have shown 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";

Below screen shows the screenshot after executing the command.

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.



Leave a Comment