• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved I can't enable load data infile permanently (losing changes after reboot)

javibus

New Pleskian
Server operating system version
Ubuntu 18.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian
Hello all!

I'm going crazy. I need to enable this feature to get Matomo software working smoothly with a high traffic volume. I have configured the db user to get FILE permissions and it works only when I enter into mysql from SSH and run this instruction:

Code:
SET GLOBAL local_infile = 1;

But, after a reboot, I lose the changes and the "local_infile" global var goes to "OFF" again.

I have added this lines to the my.cnf too:

Code:
[client]
local-infile = 1

[client-mariadb]
local-infile = 1

[mysql]
local-infile = 1

[mariadb]
local-infile = 1

[mariadb-10.1]
local-infile = 1

Nothing works. It only works when I enter into mysql from SSH and run "SET GLOBAL local_infile = 1;", but after a reboot ("service mysql restart"), the global local-inline resets to "OFF".

Please, can anyone figure out how to get this config permanently on a Plesk-Ubuntu server?

Thanks!
 
Hello,

Thanks for your response. But it throws an error.

Code:
MariaDB [(none)]> SET PERSIST local_infile = 1;
ERROR 1193 (HY000): Unknown system variable 'PERSIST'
MariaDB [(none)]> SET @@PERSIST.local_infile = 1;
ERROR 1272 (HY000): Variable 'local_infile' is not a variable component (can't be used as XXXX.variable_name)

I don't know why is Plesk omitting the my.cnf configuration. This file includes this other files:

/etc/mysql/mariadb.conf.d/50-client.cnf
/etc/mysql/mariadb.conf.d/50-mysql-clients.cnf
/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf
/etc/mysql/mariadb.conf.d/50-server.cnf

I have changed other parameters in the 50-server.cnf and it persists the reboot, but for some reason ignores the "local-infile = 1" directive.
 
Solved!!

I have created a sql file with a sentence that enables the local infile feature:
Code:
echo "SET GLOBAL local_infile = 'ON';" > /var/lib/mysql/init_file.sql
chown mysql:mysql /var/lib/mysql/init_file.sql

And I have configured the mysql service to load this file when it starts by editing the my.cnf file and adding the following under "[mysqld]":
Code:
[mysqld]
init-file=/var/lib/mysql/init_file.sql

In my case, the config file is /etc/mysql/mariadb.conf.d/50-server.cnf

Hope this helps someone in the future.
 
Back
Top