According to
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_local_infile this variable has GLOBAL scope (and I don-t think mariaDB has changed anything here. The SESSION-scope value is always inherited from the GLOBAL setting.
'local-infile' is also considered a security setting and as such it makes sense IMO that a user cannot change for his SESSION as she likes.
Also I get this (on Windows)
C:\Program Files\MariaDB 10.2\bin>mysql -u root -p local-infile=1
Enter password: ********
ERROR 1049 (42000): Unknown database 'local-infile=1'
Is it possible to specify a server variable on the commandline at all? I don't think so. At least I never heard about it.
-- Peter
-- Webyog