Skip to content

Question: mysql_replication_hostgroups Topology #4615

Open
@MichalisDBA

Description

@MichalisDBA

Hello.

May i ask. We have 1 Master and 5 Replicas.

We want to create 3 Hostgroups.

Hostgroup with ID 1 will have the Master node.
Hostgroup with ID 2 will have 2 specific Replicas.
Hostgroup with ID 3 will have the rest 3 Replicas.

In mysql_replication_hostgroups table i can not insert duplicate writer_hostgroup. How to achieve something like this?

INSERT INTO mysql_replication_hostgroups (writer_hostgroup, reader_hostgroup, check_type, comment) VALUES (1, 2, 'read_only', '1 Master / 2 Slaves');
INSERT INTO mysql_replication_hostgroups (writer_hostgroup, reader_hostgroup, check_type, comment) VALUES (1, 3, 'read_only', '1 Master / 3 Slaves');

Is there a specific reason writer_hostgroup is Primary Key and can not have duplicate Hostgroup ID?

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