#could not find driver (SQL: select * from information_schema.tables where table_schema = ecommerce a

86 messages · Page 1 of 1 (latest)

errant basin
#

I tried every solution but still not working, If anyone know about this please help me out
Thank you

strange robin
#

Share your whole error.

errant basin
#

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

strange robin
#

What driver are you using? Can you share your sanitized .env config settings?

errant basin
#

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

strange robin
#

So you most likely don't have the mysql driver installed.

errant basin
#

But already have in php.ini

strange robin
#

Also remove your encryption key

#

Have you restarted apache?

#

Or nginx if you're using that

errant basin
#

Yes

#

I have previously used migration but it was working fine

strange robin
#

Run php -m | grep -i mysql

errant basin
#

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

strange robin
#

Ah, windows?

#

php -m | findstr -i mysql

errant basin
#

Yes brother

#

Please help me

strange robin
#

Run that and see what it outputs.

errant basin
#

mysqlnd

#

this is saying

#

What i have to do now?

strange robin
#

So it doesn't look like pdo_mysql is installed.

errant basin
#

Yes brother

strange robin
#

In your PHP ini file uncomment pdo_mysql

errant basin
#

But still now working

#

Already done

strange robin
#

Then you need to restart php and apache.

errant basin
#

Yes already did

strange robin
#

Are you sure? If it was installed we'd see it there.

#

I'd think.

errant basin
#

See

#

@strange robin

strange robin
#

Okay, now go to the xampp control panel and stop/restart the apache process again

errant basin
#

I use wampp, also tried in xampp

#

giving sam error

#

Restarted

#

Not working

strange robin
#

Check php_info() and see if pdo_mysql is in there.

errant basin
#

Please check

strange robin
#

pdo_mysql would be further down under modules.

errant basin
#

Then how can i fix it?

strange robin
#

Is it not there?

#

Did you actually edit F:\wamp64\bin\apache\apache2.4.51\bin\php.ini?

errant basin
strange robin
#

Where is it symlinked to?

errant basin
#

Yes

strange robin
#

Did you search for pdo_mysql in your php_info() and find it?

errant basin
#

Yes brother

strange robin
#

So it was there?

errant basin
#

Yes brother

strange robin
#

That isn't php_info lol

errant basin
#

Then how will i find?

#

If you dont mind

#

can we seat on google meet?

strange robin
#

You linked the php_info above, just go to that page and ctrl+f and type in pdo_mysql

#

No.

errant basin
#

Or any other way?

strange robin
#

No I don't do screen share.

errant basin
#

No i will do mine

#

You will just guide me

strange robin
#

No, sorry. Just through this channel.

errant basin
#

Yeah sure

#

Where i have to join?

strange robin
#

No you misunderstand, just through text in here.

errant basin
#

Oh ok

#

this one?

#

right?

strange robin
#

Load php_info() and find pdo_mysql there.

#

That will confirm that it is installed.

errant basin
#

Oh ok wait

errant basin
#

see this brother @strange robin

#

Its here

#

Still not working

strange robin
#

Alright try this - go into your website and type php artisan optimize:clear

errant basin
#

No same result brother

strange robin
#

I'm not sure then Sakib.