At the moment, for security reasons in MySQL implemented the ability to create files only through SELECT INTO OUTFILE.
The ability to overwrite or delete files is missing. In the case of a large number of files you create, implementation of removal procedure possible only in non MySQL way.
It is proposed to implement the safe removal option for OUTFILEs. For example:
- Allow only delete the files that exist in directories tmpdir, thus isolating the OS from the database.
- Implement registration procedure for all files created using the OUTFILE, respectively delete and change only files passed the registration procedure.
- Create a single global parameter specifies where OUTILEs will be created, and allows you to manipulate files only within this parameter.
- Create a global parameter that will indicate the allowable operations for OUTFILEs (create, change, delete)
In MySQL really lacking quality file manipulation procedures.