Why does LOAD_FILE returns null?
According to the MySQl manual, these rules must be followed:
- The file must be located on the server host
- You must specify the full path name to the file
- You must have the FILE privilege
- The file must be readable by the server and its size less than max_allowed_packet bytes
- If the secure_file_priv system variable is set to a nonempty directory name, the file to be loaded must be located in that directory
The files needed to be saved to “/var/lib/mysql-files”