Note, the PHP version of Apache and Terminal could be different.
Web phpinfo() shows
Loaded Configuration File /etc/php5/apache2/php.ini
PDO drivers | mysql, sqlite
Checking on the terminal
$ php -i |grep php\.ini
Configuration File (php.ini) Path => /etc/php/5.6/cli
Loaded Configuration File => /etc/php/5.6/cli/php.ini
Checking for drivers
$ php -i|grep PDO
PDO
PDO support => enabled
PDO drivers =>
As we see we have no drivers
Ubuntu 14.04.3 LTS
sudo apt-get update
sudo apt-get install php5.6-fpm php5.6-mysql
$ php -i|grep PDO
PDO
PDO support => enabled
PDO drivers => mysql
PDO Driver for MySQL => enabled
Installing PHP 7 with Ubuntu
https://www.unixmen.com/how-to-install-lamp-stack-on-ubuntu-16-04/
To fix “Could Not Find Driver” error
Ubuntu 16.04.1 LTS
sudo apt-get update;
sudo apt-get install php7.0-fpm php7.0-mysql