![]() The only way that the LOAD command would work required the following steps: Then, I found my error in the SQL LOAD command. It appeared that I may have to remove the secure-file-priv setting from the my.ini file and reboot the server. Unfortunately, with all these set appropriately the secure-file-priv variable appears to block reading files from the designated secure directory. The Security tab indicates that the files Everyone has Full control of the files in this directory, as shown:.Clicking the Share … button, the files in this directory are shared with Read/Write permissions to Everyone, as shown below.The Sharing tab indicates that the files are Shared, as shown:.Then, I retested it with the same negative results. The General tab indicates that the files are Read-only, as shown:.Using the Windows’ File Explorer, I checked the Uploads directory’s privileges by right clicking the Uploads directory to check the Properties of the directory in the File Explorer dialog box:.You can find the my.ini file in the C:\ProgramData\MySQL\MySQL Server 8.0 directory of a standard Windows 10 file system. | secure_file_priv | C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\ | MySQL 8 installation on Windows 10 sets the following directory as the target for uploading files in the my.ini file: ![]() The MySQL FILE privilege is a global privilege to read and write files on the local server. They Windows 10 settings allowed for global sharing and both read and write privileges, but the LOAD command failed to load the file contents from the authorized Uploads directory. I checked and fixed all Windows 10 sharing and read-write privileges on the secure-file-priv designated directory. Somehow, I think there should be some mention of how to resolve this error without unsetting the server-file-privy variable. While MySQL 5.7 contains the request for he server-file-priv variable, there is nothing in the MySQL System Server Variables document on how to troubleshoot the server-file-priv variable when set. The following covers my exploration to try and fix this error without removing a designated directory for secure file uploads. ERROR: 1290: The MySQL server is running with the -secure-file-priv option so it cannot execute this statement
0 Comments
Leave a Reply. |