What driver are you using for your database?
(I'm assuming you're on linux or mac and are running your migrations from your host machine and not while SSH'd into your Vagrant Box or similar)
If it's MySQL:
Find PHP config file:
$ php -i | grep -Ei php.ini
Output:
Configuration File (php.ini) Path => /etc/php
Loaded Configuration File => /etc/php/php.ini
$ sudo nano /etc/php/php.ini
Then press ctrl+W to search, type mysql
and hit enter.
You should see the extensions list, in there remove the ;
infront of extension=pdo_mysql
Now run $ php -v
And if you see something along the lines of "Extension pdo_mysql.so not found". (You may need pdo_pgsql
or pdo_sqlite3
, depending on the driver you're running)
You just need to install the correct version of php-mysql
for your PHP installation.
Your $ php -v
output should show the version of PHP you're running.
Once the output of $ php -v
shows no errors, you should be good to go.