#could not find driver (SQL: select * from information_schema.tables where table_schema = ecommerce a
86 messages · Page 1 of 1 (latest)
Share your whole error.
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = ecommerce and table_name = migrations and table_type = 'BASE TABLE')
at F:\xampp\htdocs\ecommerce\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
715▕ }
716▕ }
1 F:\xampp\htdocs\ecommerce\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("could not find driver")
2 F:\xampp\htdocs\ecommerce\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDO::__construct()
@strange robin
What driver are you using? Can you share your sanitized .env config settings?
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:fj751kNkXOm9FWMPkXMBF/5iU50G6k6ofY29Q8sYczM=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ecommerce
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
@strange robin
So you most likely don't have the mysql driver installed.
But already have in php.ini
Also remove your encryption key
Have you restarted apache?
Or nginx if you're using that
Run php -m | grep -i mysql
grep : The term 'grep' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:10
- php -m | grep -i mysql
-
~~~~- CategoryInfo : ObjectNotFound: (grep:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
Saying this
Run that and see what it outputs.
So it doesn't look like pdo_mysql is installed.
Yes brother
In your PHP ini file uncomment pdo_mysql
Then you need to restart php and apache.
Yes already did
Okay, now go to the xampp control panel and stop/restart the apache process again
Check php_info() and see if pdo_mysql is in there.
pdo_mysql would be further down under modules.
Then how can i fix it?
Is it not there?
Did you actually edit F:\wamp64\bin\apache\apache2.4.51\bin\php.ini?
Where is it symlinked to?
Did you search for pdo_mysql in your php_info() and find it?
Yes brother
So it was there?
That isn't php_info lol
You linked the php_info above, just go to that page and ctrl+f and type in pdo_mysql
No.
Or any other way?
No I don't do screen share.
No, sorry. Just through this channel.
No you misunderstand, just through text in here.
Oh ok wait
Alright try this - go into your website and type php artisan optimize:clear
No same result brother
I'm not sure then Sakib.