Skip to content

Add support for MySQL authentication plugins configuration #881

Open
@geodro

Description

@geodro

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions