Magento – Undefined class constant ‘PDO::MYSQL_ATTR_SSL_KEY’ in/magento/setup/src/Magento/Setup/Model/ConfigOptionsList.php:179 in magento localhost

databaseinstallationmagento2magento2.3.4php-7

Ater execute any command getting this error

Operating system :- Mint ubuntu

Php version :- 7.2

Magento :- 2.3.4enter image description here

Best Answer

Could make sure that you have installed the php-pdo and php-mysql packages?

Maybe you have different PHP versions installed. Check first which PHP version you are using

php --version

then install the packages for your PHP version. For example

apt-get install php7.4-pdo php7.4-mysql
Related Topic