I'm trying to connect the MySQL database in Laravel, having some issues.
This is MySQL credentials in the .env file in Laravel.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=welcome
DB_USERNAME=krishna
DB_PASSWORD=Krish_123
I'm trying to migrate it's shown some error like bellow.
siva@siva-Latitude-3490:~/Desktop/laravel-practies-project$ php artisan migrate
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = welcome and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
+34 vendor frames
35 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))