I am trying to make a website running on a VPS linux server hosted by Inmotion that allows the user to upload a txt, csv or excel file. After uploading said file, it will be processed with some PHP calling MySQL functions. Everything works up to this point. After the processing has been finished, MySQL will write the database to an OUTFILE. This is where I run into my problem.
I cannot write the OUTFILE to any directory, it must be within the MySQL data directory or in "/var/etc/tmp" directory. Otherwise it throws a Errcode 13: permission denied error. Really, my question is this:
If possible, how can I allow MySQL to write to a directory outside the data directory? If it is possible, how can this be done?
If not possible, how can I move a file from the tmp file located in "var/etc/tmp" to a directory such as "/home/user/Directories"?
I hope I gave enough information. This is my first question StackExchage!
Thank you!