Question

In an article about securing MySQL they recommended disabling LOCAL INFILE unless I need it. http://www.greensql.com/content/mysql-security-best-practices-hardening-mysql-tips

I would like to do the same in MariaDB but the following config line doesn't seem to work in MariaDB (used to work in Mysql):

set-variable=local-infile=0

Does anybody know how to disable it? Or maybe it doesn't have a runtime config switch and needs to be compiled with a specific configure flag?

Was it helpful?

Solution

The set-variable method of setting variables was deprecated in MySQL 5, and instead you can set the variable by name directly in my.cnf.

This works for me in MariaDB 5.5.34:

[mysqld]
local-infile=0

MariaDB's documentation on setting server variables recommends setting values in my.cnf using the format

variable-name = "value"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top