"The mysql driver is not currently installed" on Debian unstable [solved]

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:

  1. drop a file info.php in /usr/share/matomo/ with this content:
<?php
phpinfo();
  1. 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

  2. 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): Debian -- Package Search Results -- php7.3-mysql

  3. 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

  4. make sure the driver is loaded in /etc/php/7.3/apache2/php.ini by uncommenting this line:

extension=pdo_mysql
  1. reload apache:
systemctl restart apache2
  1. load again the info.php page and check that this section is present: