php artisan migrate throwing [PDO Exception] Could not find driver - Using Laravel

后端 未结 26 1587
眼角桃花
眼角桃花 2020-12-01 07:41

I have a bad experience while installing laravel. However, I was able to do so and move to the next level. I used generators and created my migrations. But when I type the

26条回答
  •  鱼传尺愫
    2020-12-01 07:47

    You need to specifically enable the pdo_mysql plugin. Assuming you're using a standard PHP installation, then generally you would simply need to add this to your PHP.ini file:

    extension=pdo_mysql.so
    

    You need to ensure that this file exists in the extension directory though.

    Adding pdo_pgsql.so doesn't help because that is for PostgreSQL.

    Additionally, you should ensure that you restart the web-server after you make the changes to the PHP ini file, as the changes may not be reflected otherwise.

提交回复
热议问题