0

The yii requirements page says PDO extension + the mysql driver works, phpinfo() says that PDO and the MySQL driver is installed, I have configured the 'db' component in the main config file for my project generated with yiic webapp, checked and double checked that the settings are correct (and yes, I am using mysql).

I have made a new migration script in /[mywebapp]/protected/migrations and now I'm trying to run the ./protected/yiic migrate command, but i just get an exception:

exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver'

I have no idea what is wrong. I have been googling for 2 hours now and i find a lot of other users experiencing the same problems, but usually they are missing the drivers or something obvious. Is there anything i'm completely overlooking?

4

1 に答える 1

0

この質問のコメントに本当の答えがありますが、答えとして表示されるように、ここで答えています。Yiic.php の移行は、console.php に保存されている構成を使用します。yiic を使用するには、そこにデータベース接続を設定する必要があります。

于 2013-04-30T15:21:42.617 に答える