Support for laravel read-replica config
thattomperson opened this issue · comments
Thomas Albrighton commented
Laravel supports having a read and write key instead of host
this breaks the backup manager as it expects to see the host key
'mysql' => [
'read' => [
'host' => array_merge([env('MYSQL_HOST' , 'mysql')], explode(',', env('MYSQL_READ_REPLICAS', '')))
],
'write' => [
'host' => env('MYSQL_HOST', 'mysql')
],
// 'host' => env('MYSQL_HOST', 'mysql'),
'driver' => 'mysql',
'database' => 'default_database',
'port' => '3306',
'collation' => 'utf8_unicode_ci',
'charset' => 'utf8',
'username' => env('MYSQL_USERNAME', 'root'),
'password' => env('MYSQL_PASSWORD', 'password'),
'strict' => false,
'engine' => null,
],
Matt James commented
@thattomperson you ever come up with a workaround for this? Imo it should look to check if a read replica has been created and use that first before attempting to use a host..