Skip to content

MySQL 8.0 Group Replication / InnoDB Cluster support #743

Closed
@camo-f

Description

@camo-f

Hello,

MySQL provides a way to create replicated databases through InnoDB Cluster. It requires the plugin Group Replication and can be managed with MySQL Shell.

I encountered two issues while trying to use InnoDB Cluster with mysql:8.0 (up to 8.0.23).


MySQL Shell is not installed by default. This is debatable as it can be considered as a part of MySQL 8.0, but it would increase the size of the base image. Installation is quite easy though and could be done in the Dockerfile to enable availability on startup :

echo 'deb http://repo.mysql.com/apt/debian/ buster mysql-tools' >> /etc/apt/sources.list.d/mysql.list
apt install -y mysql-shell

On a side note, the fork made by the MySQL team ships with MySQL Shell.


Group Replication (the core plugin of InnoDB Cluster) can be configured with variables (starting with group_replication*). These variables cannot be read unless the plugin is loaded, but it cannot be done during initialization phase (this is a MySQL limitation).

In other words, it is not possible to provide a full configuration file with group_replication variables when starting a database from scratch. Variables must be added after initialization, making databases startup more cumbersome and harder to automate.

A solution would be to ignore some configuration files or a whole directory during initialization (in this case, a file containing all group_replication variables), by using an environment variable for example.


Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions