GreatSQL社区

搜索

chongzh

如果InnoDB集群元数据被删除,Router连接会发生什么情况

chongzh 已有 556 次阅读2023-9-10 21:58 |个人分类:Mysql Router|系统分类:运维实战

​删除InnoDB集群元数据的后果,如下所示:

<code style="text-align: left;"> MySQL  172.26.170.13:3306 ssl  Py > dba.drop_metadata_schema()
Are you sure you want to remove the Metadata? [y/N]: y
Metadata Schema successfully removed.

如果删除了InnoDB集群元数据,路由器将无法连接到集群。使用客户端直通路由器对标准R/W流量进行的持续模拟失败,原因如下:

现有的连接会被路由器丢弃。任何通过路由器建立的到集群的新连接也将失败。

Router logs contain:

[root@test_cdh_001 ~]# tail -f /var/log/mysqlrouter/mysqlrouter.log
​
2023-09-10 21:34:03 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.13:3306 - Expected MySQL Server '172.26.170.13:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:03 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.14:3306 - Expected MySQL Server '172.26.170.14:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:03 metadata_cache INFO [7fc6e041a700] Connected with metadata server running on 172.26.170.15:3306
2023-09-10 21:34:03 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.15:3306 - Expected MySQL Server '172.26.170.15:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:03 metadata_cache ERROR [7fc6e041a700] Failed fetching metadata from any of the 3 metadata servers.
2023-09-10 21:34:03 metadata_cache INFO [7fc6e041a700] ... cleared current routing table as a precaution
2023-09-10 21:34:03 routing INFO [7fc6e041a700] Stop accepting connections for routing routing:bootstrap_x_rw listening on 6448
2023-09-10 21:34:03 routing INFO [7fc6e041a700] Stop accepting connections for routing routing:bootstrap_x_ro listening on 6449
2023-09-10 21:34:03 routing INFO [7fc6e041a700] Stop accepting connections for routing routing:bootstrap_ro listening on 6447
2023-09-10 21:34:03 routing INFO [7fc6e041a700] Stop accepting connections for routing routing:bootstrap_rw listening on 6446
2023-09-10 21:34:04 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.13:3306 - Expected MySQL Server '172.26.170.13:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:04 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.14:3306 - Expected MySQL Server '172.26.170.14:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:04 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.15:3306 - Expected MySQL Server '172.26.170.15:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:04 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.13:3306 - Expected MySQL Server '172.26.170.13:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server
​
2023-09-10 21:34:04 metadata_cache WARNING [7fc6e041a700] Failed fetching metadata from metadata server on 172.26.170.14:3306 - Expected MySQL Server '172.26.170.14:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist.
Checking version of the metadata schema failed with: Error executing MySQL query "SELECT * FROM mysql_innodb_cluster_metadata.schema_version": Unknown database 'mysql_innodb_cluster_metadata' (1049)
​
See https://dev.mysql.com/doc/mysql-shell/en/deploying-production-innodb-cluster.html for instructions on setting up a MySQL Server to act as an InnoDB Cluster Metadata server


为了重新建立连接,必须重新导入集群,以便再次创建元数据。

<code style="text-align: left;"> MySQL  172.26.170.13:3306 ssl  Py > dba.create_cluster('GreatSQLMGR');
A new InnoDB cluster will be created on instance '172.26.170.13:3306'.
​
You are connected to an instance that belongs to an unmanaged replication group.
Do you want to setup an InnoDB cluster based on this replication group? [Y/n]: y
Creating InnoDB cluster 'GreatSQLMGR' on '172.26.170.13:3306'...
​
Adding Seed Instance...
Adding Instance '172.26.170.13:3306'...
Adding Instance '172.26.170.14:3306'...
Adding Instance '172.26.170.15:3306'...
Resetting distributed recovery credentials across the cluster...
NOTE: User 'mysql_innodb_cluster_3306171'@'%' already existed at instance '172.26.170.13:3306'. It will be deleted and created again with a new password.
NOTE: User 'mysql_innodb_cluster_33061023'@'%' already existed at instance '172.26.170.13:3306'. It will be deleted and created again with a new password.
NOTE: User 'mysql_innodb_cluster_3306596'@'%' already existed at instance '172.26.170.13:3306'. It will be deleted and created again with a new password.
Cluster successfully created based on existing replication group.
​


评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-5-4 05:27 , Processed in 0.013089 second(s), 8 queries , Redis On.
返回顶部