Laravel 5.2 PDO终端上的例外情况

I am trying to recreate a downloaded site with Laravel 5.2 in my VPS and I am getting a PDO Exception when I run php artisan command on the terminal:

enter image description here

I checked that MySQL was installed with sudo apt-get install php5-mysql and it has the latest version. I also sought in phpinfo() and I got the following information:

enter image description here

So, any clues?

The PHP CLI often uses a different php.ini to the one used by the web server.

Do a php -i | grep -i Loaded Configuration File

Then check the php.ini file and if this line is commented with a ; remove the ; so the line looks like this

;extension php_pdo_mysql.so

Change to

extension php_pdo_mysql.so

This will activate the PDO extension