0

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))
siva krishna R
  • 61
  • 1
  • 1
  • 6
  • Not enough information, Is this local development or a deployed production issue? What stack are you using on what Operating System? – Marc Oct 29 '20 at 11:33
  • It is local development. and I'm using ubuntu – siva krishna R Oct 30 '20 at 04:30
  • Does this answer your question? [Laravel 5 PDOException Could Not Find Driver](https://stackoverflow.com/questions/35240414/laravel-5-pdoexception-could-not-find-driver) – Marc Oct 30 '20 at 15:58
  • Possible duplicate: https://stackoverflow.com/questions/42557693/laravel-pdoexception-could-not-find-driver https://stackoverflow.com/questions/35240414/laravel-5-pdoexception-could-not-find-driver – Marc Oct 30 '20 at 15:58

0 Answers0