重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 82|回复: 0
打印 上一主题 下一主题

[安装] mysql innodb clusgter 元信息警告处理

[复制链接]
跳转到指定楼层
楼主
发表于 2026-4-8 19:49:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
MySQL  localhost  JS > cluster.status()
{
    "clusterName": "testcluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "mysql-node1:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "mysql-node1:3306": {
                "address": "mysql-node1:3306",
                "instanceErrors": [
                    "WARNING: The replication recovery account in use by the instance is not stored in the metadata. Use Cluster.rescan() to update the metadata.",
                    "WARNING: Detected unused recovery accounts: mysql_innodb_cluster_2, mysql_innodb_cluster_3. Use Cluster.rescan() to clean up."
                ],
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            },
            "mysql-node2:3306": {
                "address": "mysql-node2:3306",
                "instanceErrors": [
                    "WARNING: Instance is not managed by InnoDB cluster. Use cluster.rescan() to repair.",
                    "ERROR: Invalid or missing information of Group Replication's network address in metadata. Use Cluster.rescan() to update the metadata.",
                    "ERROR: Metadata for this instance does not match X plugin port reported by instance (metadata=, actual=mysql-node2:33060). Use rescan() to update the metadata."
                ],
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            },
            "mysql-node3:3306": {
                "address": "mysql-node3:3306",
                "instanceErrors": [
                    "WARNING: Instance is not managed by InnoDB cluster. Use cluster.rescan() to repair.",
                    "ERROR: Invalid or missing information of Group Replication's network address in metadata. Use Cluster.rescan() to update the metadata.",
                    "ERROR: Metadata for this instance does not match X plugin port reported by instance (metadata=, actual=mysql-node3:33060). Use rescan() to update the metadata."
                ],
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "mysql-node1:3306"
}

直接在mysql shell的 java script 模式,使用rescan() 解决
MySQL  localhost  JS > var cluster=dba.getCluster();

MySQL  localhost  JS > cluster.rescan();
Rescanning the cluster...

Result of the rescanning operation for the 'testcluster' cluster:
{
    "metadataConsistent": true,
    "name": "testcluster",
    "newTopologyMode": null,
    "newlyDiscoveredInstances": [
        {
            "host": "mysql-node3:3306",
            "member_id": "ab92788d-329e-11f1-a354-525402a712ea",
            "name": null,
            "version": "8.4.8"
        },
        {
            "host": "mysql-node2:3306",
            "member_id": "ae1b6411-32ff-11f1-8436-525402a73951",
            "name": null,
            "version": "8.4.8"
        }
    ],
    "unavailableInstances": [],
    "updatedInstances": []
}

A new instance 'mysql-node3:3306' was discovered in the cluster.
Would you like to add it to the cluster metadata? [Y/n]: Y
Adding instance to the cluster metadata...
The instance 'mysql-node3:3306' was successfully added to the cluster metadata.

A new instance 'mysql-node2:3306' was discovered in the cluster.
Would you like to add it to the cluster metadata? [Y/n]: Y
Adding instance to the cluster metadata...
The instance 'mysql-node2:3306' was successfully added to the cluster metadata.

Fixing incorrect recovery account 'mysql_innodb_cluster_3' in instance 'mysql-node1:3306'
Fixing incorrect recovery account 'mysql_innodb_cluster_2' in instance 'mysql-node3:3306'
MySQL  localhost  JS > cluster.status()
{
    "clusterName": "testcluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "mysql-node1:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "mysql-node1:3306": {
                "address": "mysql-node1:3306",
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            },
            "mysql-node2:3306": {
                "address": "mysql-node2:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            },
            "mysql-node3:3306": {
                "address": "mysql-node3:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.4.8"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "mysql-node1:3306"
}




分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2026-4-17 18:29 , Processed in 0.282034 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表