E
E
edik892016-11-07 17:50:36
Yii
edik89, 2016-11-07 17:50:36

Why doesn't php yii migrate/up work?

Created an Ubuntu 14 virtual machine via vagrant. The site works fine, there are no problems with connecting to the database. When I try to execute php yii migrate/up from under the console, it gives an error:

Exception 'yii\db\Exception' with message 'could not find driver'

in /home/vagrant/www/test-news/vendor/yiisoft/yii2/db/Connection.php:549

I haven't found a solution on the Internet. I tried to change the localhost database connection settings to 127.0.0.1, it did not help. I checked the extensions using php -m, everything seems to be ok too. I think that some troubles vagrant. Nobody faced?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-11-07
@webinar

Check the console config, theoretically it should pull the connection to bd from the main config, but maybe you have a redefined connection there or vice versa, your application pulls its own config, but there is no connection in common or the connection is not correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question