Yii2: could not find driver: Caused by: PDOException

Created on 1 Sep 2016  路  3Comments  路  Source: yiisoft/yii2

Not sure how to fix this.

What steps will reproduce the problem?

Clean install on Ubuntu 14.04

What is the expected result?

Database driver is installed

What do you get instead?

could not find driver
Caused by: PDOException
could not find driver
in /var/www/mp/vendor/yiisoft/yii2/db/Connection.php at line 603

Additional info

| Q | A |
| --- | --- |
| Yii version | 2.0.? |
| PHP version | |
| Operating system | |

question

Most helpful comment

sudo apt-get install php5-mysql

All 3 comments

sudo apt-get install php5-mysql

I have the same issue after running a yii2 project on a different PC (Different from the one it was developed on). I am using Windows 8.1 and WAMP, connecting to a remote SQL server. From PHPinfo(), I can see that I have;
PDO drivers (mysql, odbc and sqlite) enabled. For pdo_mysql, I can see mysqlnd 5.0.11. What could be the problem?

NB. I am new to yii2.

Thank you for your question.
In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

_This is an automated comment, triggered by adding the label question._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vercotux picture vercotux  路  47Comments

schmunk42 picture schmunk42  路  47Comments

Faryshta picture Faryshta  路  48Comments

alexandernst picture alexandernst  路  163Comments

SamMousa picture SamMousa  路  55Comments