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

后端 未结 26 1586
眼角桃花
眼角桃花 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:58

    I was also getting the same error --> "[PDOException] could not find driver "

    I realized that the php was pointing to /usr/bin/php instead of the lampp /opt/lampp/bin/php so i simply created and alias

    alias php="/opt/lampp/bin/php"

    also had to make update to the .env file to ensure the database access credentials were updated.

    And guess what, it Worked!

提交回复
热议问题