Could not find driver error - Docker version

Suddenly getting an error trying to start the container. This is the error I get each time I try to start.

2023-06-03T13:57:07Z [INFO] [Entrypoint]: Initialising Invoice Ninja...

   INFO  Configuration cached successfully.  


   INFO  Caching the framework bootstrap files.  

  config ........................................................... 41ms DONE
  routes .......................................................... 124ms DONE


In Connection.php line 760:
                                                                               
  could not find driver (SQL: select * from information_schema.tables where t  
  able_schema = ninjav5 and table_name = accounts and table_type = 'BASE TABL  
  E')                                                                          
                                                                               

In Connector.php line 70:
                         
  could not find driver

The container exits immediately so I can’t really try any other troubleshooting. I’m using a MariaDB back end.

Hi,

Maybe this will help:

Wouldn’t a change like that need to be done every time the container is updated? It’s not my container it’s the one from the unRAID apps.

@david do you have any thoughts?

Looks like the system is missing the mysql-client library to run the migrations.

Is that a one time thing that’s needed?

@nironwolf

It is used to perform database migrations, so typically each release may contain migrations that are needed for database updates, so it should always be present.

Makes sense. The unRAID app template is pointing to this version maihai/invoiceninja_v5 which seems to be updated nightly. Is this provided by InvoiceNinja or a 3rd party?

I’m not familiar with that link, the official Dockerfile is here:

https://hub.docker.com/r/invoiceninja/invoiceninja

1 Like

So I setup everything with the official docker container and I get the same error message.

I had been running along updating MariaDB and I think maybe and update from the 10.6 to 10.11 back end could be causing this. Should I roll back my updates for MariaDB? I had been faithfully hitting update out of security concerns, but it’s not exposed to the outside world so I may be ok with reverting. However none of the other software that connects to it seems to be having issues, so I’m a bit confused.

Running php -m in the container I get this output:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

I see that mysqli specifically isn’t on the list. But I don’t know enough about php modules to know if mysqlnd is an equivalent. I also don’t see ‘pdo_mysql’ which is mentioned in the stack exchange link you sent.

So I also tried setting up a new MariaDB user and a fresh, empty database. It gives the same error.

After setting up new containers, restoring databases, downgrading database, playing with .env files for the APP_KEY to fix MAC errors, and moving the old documents folder around and chown-ing it to the right user:group…

It’s working again. But only if I use the docker container for 5.5.123. It runs fine with the original MariaDB container running 10.11. But if I update it to 5.5.124 the connection error returns.

tl;dr Had to downgrade to 5.5.123 (Which I couldn’t do with the container in the unRAID App Store because he doesn’t make anything but a “latest”.)