Professional Documents
Culture Documents
Installing and Configuring InnoDB Cluster _ by All database Solutions _ Medium
Installing and Configuring InnoDB Cluster _ by All database Solutions _ Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 1/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 2/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
Installation
1) Install MySQL Server on all three node of the cluster.
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 3/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 4/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_applier_status_by_coordinator
TO clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_applier_status_by_worker TO
clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_connection_configuration TO
clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_connection_status TO
clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_group_member_stats TO
clusteradmin@’%’;
GRANT SELECT ON
performance_schema.replication_group_members TO
clusteradmin@’%’;
GRANT SELECT ON performance_schema.threads TO
clusteradmin@’%’ WITH GRANT OPTION;
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 5/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
mysqlsh — log-level=DEBUG3
mysql-js> dba.verbose=2
dba.checkInstanceConfiguration(‘mysqlhost01@mysqlhost01–
1:3306’)
root@mysqlhost01:~# hostname
mysqlhost01
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 6/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 7/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 8/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
{
“config_errors”: [
{
“action”: “server_update”,
“current”: “CRC32”,
“option”: “binlog_checksum”,
“required”: “NONE”
},
{
“action”: “server_update+restart”,
“current”: “OFF”,
“option”: “enforce_gtid_consistency”,
“required”: “ON”
},
{
“action”: “server_update+restart”,
“current”: “OFF”,
“option”: “gtid_mode”,
“required”: “ON”
},
{
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 9/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
“action”: “server_update+restart”,
“current”: “1”,
“option”: “server_id”,
“required”: “<unique ID>”
}
],
“status”: “error”
}
MySQL JS >
mysqlsh — log-level=DEBUG3
mysql-js> dba.verbose=2
dba.configureLocalInstance(‘clusteradmin@mysqlhost01:3306’)
MySQL JS >
dba.configureLocalInstance(‘clusteradmin@mysqlhost01:3306’)
Please provide the password for
‘clusteradmin@mysqlhost01:3306’: ************************
Save password for ‘clusteradmin@mysqlhost01:3306’?
[Y]es/[N]o/Ne[v]er (default No):
Configuring local MySQL instance listening at port 3306 for use
in an InnoDB cluster…
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 10/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 11/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
MySQL JS >
dba.checkInstanceConfiguration(‘clusteradmin@mysqlhost01:33
06’)
Please provide the password for
‘clusteradmin@mysqlhost01:3306’: ************************
Save password for ‘clusteradmin@mysqlhost01:3306’?
[Y]es/[N]o/Ne[v]er (default No):
Validating local MySQL instance listening at port 3306 for use in
an InnoDB cluster…
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 12/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
{
“status”: “ok”
}
MySQL JS >
5) Create Cluster
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 13/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 14/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 15/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
“topology”: {
“mysqlhost01:3306”: {
“address”: “mysqlhost01:3306”,
“mode”: “R/W”,
“readReplicas”: {},
“role”: “HA”,
“status”: “ONLINE”,
“version”: “8.0.17”
}
},
“topologyMode”: “Single-Primary”
},
“groupInformationSourceMember”: “mysqlhost01:3306”
}
MySQL mysqlhost01:3306 ssl JS > cluster.describe();
{
“clusterName”: “MysqlCluster”,
“defaultReplicaSet”: {
“name”: “default”,
“topology”: [
{
“address”: “mysqlhost01:3306”,
“label”: “mysqlhost01:3306”,
“role”: “HA”,
“version”: “8.0.17”
}
],
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 16/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
“topologyMode”: “Single-Primary”
}
}
cluster.addInstance(‘clusteradmin@mysqlhost02:3306’);
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 17/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 18/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 19/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
** Stage RECOVERY: \
NOTE: mysqlhost02:3306 is shutting down…
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 20/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 21/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
“mysqlhost03:3306”: {
“address”: “mysqlhost03:3306”,
“mode”: “R/O”,
“readReplicas”: {},
“role”: “HA”,
“status”: “ONLINE”,
“version”: “8.0.17”
}
},
“topologyMode”: “Single-Primary”
},
“groupInformationSourceMember”: “mysqlhost02:3306”
}
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 22/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 23/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
+————+
| 3306 |
+————+
1 row in set (0.0007 sec)
MySQL localhost:6446 ssl SQL > select @@hostname;
+———————+
| @@hostname |
+———————+
| mysqlhost01 |
+———————+
1 row in set (0.0006 sec)
MySQL localhost:6446 ssl SQL >
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 24/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 25/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
+———————+
| @@hostname |
+———————+
| mysqlhost01 |
+———————+
1 row in set (0.0007 sec)
MySQL localhost:6446 ssl SQL >
========================================
You can also , Visit our Blogs for related topic on MySQL InnoDB
Cluster:
1)MySQL InnoDB Cluster node Addition Issue: —
Cluster.addInstance: : MySQL server has gone away
(RuntimeError)
2)Install & Configure MySQL Router — MySQL InnoDB Cluster
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 26/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
14 Followers
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 27/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 28/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
Lists
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 29/30
04/07/2024, 14:44 Installing and Configuring InnoDB Cluster | by All database Solutions | Medium
https://medium.com/@alldatabase.solutions/installing-and-configuring-innodb-cluster-e427250ac82c 30/30