Vous êtes sur la page 1sur 2

https://www.digitalocean.

com/community/tutorials/how-to-configure-mysql-group-
replication-on-ubuntu-16-04
http://lefred.be/content/migration-from-mysql-master-slave-pair-to-mysql-innodb-
cluster-howto/
https://mysqlhighavailability.com/getting-started-with-mysql-group-replication/

ALTER USER 'root'@'localhost' IDENTIFIED BY 'Molafako27##';

create user 'innodbclust'@'%' identified by 'Molafako27##';

GRANT ALL PRIVILEGES ON mysql_innodb_cluster_metadata.* TO 'innodbclust'@'%' WITH


GRANT OPTION;
GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SUPER, REPLICATION SLAVE, REPLICATION
CLIENT, \
CREATE USER ON *.* TO 'innodbclust'@'%' WITH GRANT OPTION;
GRANT SELECT ON *.* TO 'innodbclust'@'%' WITH GRANT OPTION;

privileges needed to monitor InnoDB cluster

GRANT SELECT ON mysql_innodb_cluster_metadata.* TO 'innodbclust'@'%';


GRANT SELECT ON performance_schema.global_status TO 'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_applier_configuration TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_applier_status TO 'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_applier_status_by_coordinator TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_applier_status_by_worker TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_connection_configuration TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_connection_status TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_group_member_stats TO
'innodbclust'@'%';
GRANT SELECT ON performance_schema.replication_group_members TO 'innodbclust'@'%';
GRANT SELECT ON performance_schema.threads TO 'innodbclust'@'%' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'innodbclust'@'%';

setup my.cnf

on all 3 servers:

mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';


Query OK, 0 rows affected (0.02 sec)

dba.checkInstanceConfiguration('innodbclust@centos01:3306')

dba.configureLocalInstance('innodbclust@centos01:3306')

\connect innodbclust@centos01:3306
var cluster = dba.createCluster('prodCluster')

cluster.status();

connect to centos02

mysqlsh

\connect innodbclust@centos01:3306

cluster = dba.getCluster()

cluster.addInstance('innodbclust@centos02:3306');

cluster.status();

NDB:

https://www.howtoforge.com/tutorial/how-to-install-and-configure-mysql-cluster-on-
centos-7/
https://www.howtoforge.com/tutorial/how-to-install-a-mysql-cluster-on-ubuntu-16-04/

dba.rebootClusterFromCompleteOutage('prodCluster')

MySQL centos01:3306 ssl JS > dba.rebootClusterFromCompleteOutage('prodCluster')


Reconfiguring the cluster 'prodCluster' from complete outage...

WARNING: On instance 'centos01:3306' membership change cannot be persisted since


MySQL version 5.7.22 does not support the SET PERSIST command (MySQL version >=
8.0.5 required). Please use the <Dba>.configureLocalInstance command locally to
persist the changes.

The cluster was successfully rebooted.

<Cluster:prodCluster>

Vous aimerez peut-être aussi