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

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

    I found the proper solution for this error! Either you don't have any database installed or your default database in this file config/database.php is set to some other database like this

    'default' => 'sqlite',
    'default' => env('DB_CONNECTION', 'sqlite'), //laravel 5.2
    

    change the default to which one you have installed or install that database which is made to be default! I had installed mysql and php artisan migrate worked after i changed that line to this:

    'default' => 'mysql',
    'default' => env('DB_CONNECTION', 'mysql'), //laravel5.2
    

提交回复
热议问题