The error message is: A facade root has not been set.
Any advice is really helpful.
You should try this:
Leave a default or null value in your config/database.php
file. Create a new service provider (either with the artisan command or manually)
php artisan make:provider DatabaseConfigProvider
Then add the new provider to the $providers array in your config/app.php file.
Finally add the following code to the boot() method.
public function boot()
{
$result= \DB::select('select version() as version')[0];
$this->app['config']->put('database.connections.mysql.version', $result->version);
}
The key in the put() argument can be whatever you want.