Error when running any console command like php bin/console cache:clear

Your software
My Mautic version is: 4.4.10
My PHP version is: 8.3.1
My Database type and version is: 10.6.12-MariaDB

Your problem
My problem is: cant run any console command

These errors are showing in the log:
In ConnectionFactory.php line 136:

An exception occurred while establishing a connection to figure out your platform version.
You can circumvent this by setting a ‘server_version’ configuration value

For further information have a look at:
https://github.com/doctrine/DoctrineBundle/issues/673

In AbstractMySQLDriver.php line 128:

An exception occurred in driver: could not find driver

In Exception.php line 18:

could not find driver

In PDOConnection.php line 40:

could not find driver

Steps I have tried to fix the problem:

Related GitHub issue: Mautic 5.0.0 installation issue · Issue #13186 · mautic/mautic · GitHub

Are you sure you’ve provided correct database credentials? Can you connect with those credentials from other tool like Sequel Pro for example?