PDOException: could not find driver in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php

Hi,

I cannot poll. Validate.php gives me:

Component Version
LibreNMS 1.48.1-25-g21192a9
DB Schema Not Connected (0)
PHP 7.2.18-1+ubuntu16.04.1+deb.sury.org+1
MySQL ?
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
Could not connect to database, check logs/librenms.log.

The log shows the error:
[2019-05-22 13:24:40] production.ERROR: PDOException: could not find driver in /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /opt/librenms/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/$

Using the details in config.php I can log into the database, and show the tables just fine, from access_points to wireless_sensors, so I think MySQL is OK.

How should I proceed?

Many thanks,
Justin

Is this a new install, or how did it stop working ?

I think your missing a package like php7.2-mysql

Check the install docs to make sure you have all the required packages installed

Installing php7.2-mysql (and a few 7.2 modules, i.e. gd, etc.) sorted it, many thanks!

This is a very (2+ years) old install - I suspect the server automatically updated to php7.2, but did not update the various modules accordingly.

Many thanks for your help!

Justin

1 Like