Since a few days on Debian sid (unstable) we get this:
An error occurred
Cannot connect to the database:
The mysql driver is not currently installed
This may be a temporary issue, try refreshing the page. If the problem persists please contact your Matomo administrator.
Go Back | Go to Matomo
Matomo.org homepage
Frequently Asked Questions
User Guides
Matomo Forums
Professional Support for Matomo
« Back to Matomo
I have been able to work around it as follows:
- drop a file
info.php
in/usr/share/matomo/
with this content:
<?php
phpinfo();
-
open https://example.com/matomo/info.php and look for
Configuration File (php.ini) Path
, the value is:/etc/php/7.3/apache2
; mmmh so we are using php 7.3 although Debian unstable’s default PHP version is 7.4 -
try to install the driver:
sudo apt install php7.3-mysql
only to discover that that package is not anymore available for unstable for my arch (amd64
): https://packages.debian.org/search?keywords=php7.3-mysql -
download the package for Debian 11 (bullseye):
wget http://ftp.us.debian.org/debian/pool/main/p/php7.3/php7.3-mysql_7.3.15-3_amd64.deb
and install it:sudo apt install ./php7.3-mysql_7.3.15-3_amd64.deb
-
make sure the driver is loaded in
/etc/php/7.3/apache2/php.ini
by uncommenting this line:
extension=pdo_mysql
- reload apache:
systemctl restart apache2
- load again the
info.php
page and check that this section is present: