初めまして。当方、プログラミングを自主学習しているものです。
laravelにて、php artisan migrate実行後のエラーが解消しないので、ご教示頂けないでしょうか。
発生している問題・エラーメッセージ
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
at /home/ec2-user/environment/simpleboard/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
経緯
①simpleboard内のenvファイルを以下のように変更。
■変更前
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
■変更後
- DB_CONNECTION=sqlite
②以下のコマンドでDBを作成
③php artisan migrateを実行
先述のエラーが発生
試したこと
sudo apt install php7.2-sqlite3でドライバーをインストールして、再度上記の①~③を実施するも同様のエラーが発生。
