Matomo LOAD DATA INFILE

Hello I am fan of Matomo Stats and with HestiaCP i get this message

Using LOAD DATA INFILE will greatly speed Matomo’s archiving process up. To make it available to Matomo, try updating your PHP & MySQL software and make sure your database user has the FILE privilege.
If your Matomo server tracks high traffic websites (eg. > 100,000 pages per month), we recommend trying to fix this problem.
Error: LOAD DATA INFILE failed… Error was:
ry #1: LOAD DATA INFILE : SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user ‘dbusername’@‘localhost’ (using password: YES)[28000],
Try #2: LOAD DATA LOCAL INFILE : SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MariaDB version[42000]
Troubleshooting: FAQ on matomo.org

Any ideas how to solve that?

Did you check the faq on Matomo?

If the LOAD DATA INFILE is still not working, try the following:

  • check in your config/config.ini.php that you do not have enable_load_data_infile=0 . If you see this line in the file, delete it.
  • and/or update to the latest PHP version, or use the mysqli client (there are some known bugs with older PDO clients for mysql)
  • and/or switch the client to adapter=MYSQLI in the config/config.ini.php
  • and/or disable in your php configuration php.ini the options open_basedir and safe_mode . Restart webserver.
  • and/or if you are using PHP-Mysqli, you may have to enable the PHP setting mysqli.allow_local_infile = On
  • on Ubuntu / Debian servers, you may try to uninstall php5-mysql package and install instead php5-mysqlnd: sudo apt-get install php5-mysqlnd
  • on some systems you may also need to set secure_file_priv="" under [mysqld]
  • You can change the permission for your Mysql user to allow the user to import the files: GRANT FILE on *.* to [email protected] . Note it is generally not recommended for security reasons, and LOAD DATA LOCAL INFILE should work without this additional GRANT FILE permission.
1 Like