Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling LOCAL INFILE in MariaDB

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?

like image 738
k3a Avatar asked Mar 21 '23 14:03

k3a


1 Answers

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"
like image 83
Michael Berkowski Avatar answered Mar 29 '23 18:03

Michael Berkowski