In order to secure my server, I'd like to set:

secure_file_priv = NULL

As per MySQL's docs - http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_secure_file_priv

If set to NULL, the server disables import and export operations. This value is permitted as of MySQL 5.7.6.

However, that value doesn't seem to be in MariaDB's docs - https://mariadb.com/kb/en/mariadb/server-system-variables/#secure_file_priv

If I try NULL in MariaDB 10, I get this error:

[Warning] Failed to normalize the argument for --secure-file-priv.

What do you recommend to prevent import/export operations?

If I set to a given folder, will things like OUTFILE ../../../etc/my.cnf work? (i.e., relative paths, going level ups)

  • local_infile = ON has some security issues. Change to OFF. – Rick James Oct 29 '16 at 19:35
  • set it to a non-existent folder to prevent/disable this operation..hope it helps – Nawaz Sohail Nov 1 '16 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.