0

the error(screenshot)

When i try php artisan migrate:fresh this error appears, I tried enabling extension=pdo_mysql but It didn't work error:

could not find driver (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

Kenny Horna
  • 13,485
  • 4
  • 44
  • 71

2 Answers2

0

You have to install your database driver.

sudo apt install php-mysql

or if you run a specific version of PHP or change mysql to the database you are running

sudo apt install php7.4-mysql
mrhn
  • 17,961
  • 4
  • 27
  • 46
0

Check your .env file. You must have the following env vars:

DB_CONNECTION=mysql
DB_PORT={YOUR_DB_PORT}
DB_HOST={YOUR_DB_HOST}
DB_DATABASE={YOUR_DB_DATABASE}
DB_USERNAME={YOUR_DB_USERNAME}
DB_PASSWORD={YOUR_DB_PASSWORD}
Tiago Mateus
  • 356
  • 4
  • 17