laravel postgresql could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE') code example
Example 1: could not find driver (SQL: select * from information_schema.tables where table_schema = francis_koopmart and table_name = migrations and table_type = 'BASE TABLE')
If your php.ini file exists then in configuration file simply uncomment the extension:
;extension=php_pdo_mysql.dll
Else follow below steps
step1:php -v
step2: Install php mysql extension
php 7.0 sudo apt-get install php7.0-mysql
php 7.1 sudo apt-get install php7.1-mysql
php 7.2 sudo apt-get install php7.2-mysql
php 7.3 sudo apt-get install php7.3-mysql
step3: service apache2 restart
step4: php artisan migrate
Example 2: Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
You may have to specify a connection socket in your config or use 127.0.0.1 as your DB_HOST rather than localhost