Matomo LOAD DATA INFILE

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 piwik@localhost . Note it is generally not recommended for security reasons, and LOAD DATA LOCAL INFILE should work without this additional GRANT FILE permission.
1 Like