laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
942 stars 63 forks source link

could not find driver (Connection: mysql, SQL: select * from `cache` where `key` = laravel:reverb:restart limit 1) #196

Closed rawezhcode closed 2 months ago

rawezhcode commented 2 months ago

Reverb Version

1.0.0-beta10

Laravel Version

11

PHP Version

8.3

Description

` Illuminate\Database\QueryException

could not find driver (Connection: mysql, SQL: select * from cache where key = laravel:reverb:restart limit 1)

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813 809▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 810▕ ); 811▕ } 812▕ ➜ 813▕ throw new QueryException( 814▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 815▕ ); 816▕ } 817▕ }

  +37 vendor frames 

38 artisan:13 Illuminate\Foundation\Application::handleCommand() ` I've done everything a lot, everything is working fine now, but it shows this error in the log file

Steps To Reproduce

` Illuminate\Database\QueryException

could not find driver (Connection: mysql, SQL: select * from cache where key = laravel:reverb:restart limit 1)

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813 809▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 810▕ ); 811▕ } 812▕ ➜ 813▕ throw new QueryException( 814▕ $this->getName(), $query, $this->prepareBindings($bindings), $e 815▕ ); 816▕ } 817▕ }

  +37 vendor frames 

38 artisan:13 Illuminate\Foundation\Application::handleCommand() `

SCR-20240514-lema
l3aro commented 2 months ago

It seems you're persisting cache in database. Laravel 11 offer using cache in database by default, with migration included like below

image

So you have 2 options to solved that

  1. Setup database connection then run the migration
  2. Setup redis then change CACHE_STORE to redis (recommended)
driesvints commented 2 months ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.