multi-tenant
multi-tenant copied to clipboard
Add support for MySQL authentication plugins configuration
Description of your feature
If we use managed databases from DigitalOcean, they support only caching_sha2_password as auth plugin for mysql. We should add in config the option of what auth plugin tenancy should use.
Proposed behavior
Hyn\Tenancy\Generators\Webserver\Database\Drivers\MariaDB:42
return $connection->statement("CREATE USER IF NOT EXISTS {$config['username']}@'{$config['host']}' IDENTIFIED WITH {$config['auth_method']} BY {$config['password']}'");
where auth_method should be mysql_native_password or caching_sha2_password
Current behavior
Hyn\Tenancy\Generators\Webserver\Database\Drivers\MariaDB:42
return $connection->statement("CREATE USER IF NOT EXISTS {$config['username']}@'{$config['host']}' IDENTIFIED BY '{$config['password']}'");
Information
- hyn/multi-tenant version: 5.5
- laravel version: ^5.8
If you could, please create a Pull Request with some tests so we're sure nothing breaks.