I am using MYSQL 8 on Focal
Ver 8.0.26-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))
I am using LOAD DATA INFILE ...
This is working when I have files in /var/lib/mysql-files as per the secure-file-priv setting.
But even to get this working I had to add world read/write permissions to the mysql-files folder to allow my script to put files into /var/lib/mysql
This was all working fine until there was an automatic update that restarted mysqld, and then the mysql-files permission reverted to 700 and my LOAD DATA stopped working.
Thought that I would change secure-file-priv to be a folder under the user folder that the script is running under.
I changed the secure-file-priv to the new folder, restarted mysqld, checked the secure-file-priv variable was updated, which it was.
I also checked that the access to the folder and files was just the same as it was for when the secure-file-priv was /var/lib/mysql-files and I still get permission error 13.
I also rebooted the server, same issue.
Tried changing secure-file-priv to /tmp also no luck, still permission error 13
I only have success using /var/lib/mysql-files
Does anyone know why I can't use another folder? Even if that folder is world r/w?
Thanks