Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The detailed installation process of MYSQL 8 Innodb cluster mysqlsh and what is it around?

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Today, I will talk to you about the detailed process of MYSQL 8 Innodb cluster mysqlsh installation and what it is like around it. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

Since the last issue began to install the text about innodb cluster, I feel a sudden wind of innodb cluster, the mastery of new technology seems to be very enthusiastic.

Today's issue actually begins to take stock of some details, first take an inventory of the surrounding commands, and then summarize some configuration parameters in the installation and the storage location of the related information.

1 get the status of the current innodb cluster. After connecting to a machine in innodb cluster through connect, we obtain the information of the cluster through the getCluster () command, and then display the information through the specified command in the message.

Var cluster_1 = dba.getCluster ()

Cluster_1.describe ()

Cluster_1.status ()

In traditional MYSQL, we use performace_schema replication_group_members to check the cluster status of the system, but now we can see the cluster status more quickly through status (). In the figure, we can clearly see that mgr3 is already in the state of missing.

This mode of operation and presentation makes people feel a bit like operating MONGODB.

In fact, cluster_1.status ({'extended':3}) can get more information by getting status.

In fact, through secondary development, there is a better way to judge the delay of data replication between nodes.

2 with regard to the state of clone, this is a relatively good state to show, from a master clone to a slave library, how much this state has been copied and how much is missing, which is meaningful to the operator.

For example, it is mentioned in the official document that currentStageProcess in clone can show what percentage of the current clone status is. From this, we can feel the change of integration and humanization of MYSQL 8.

-

To reorganize the installation, this time it doesn't start with three standalone machines, this time it starts with a cluster that has already been formed.

1 dissolve the cluster

First confirm the status of the cluster

Var cluster_v = dba.getCluster ()

Cluster_v.status ()

2 cluster_v.dissolve ()

Then through manual confirmation, the cluster is directly disbanded.

Then run dba.dropMetadataSchema () in each cluster

Otherwise, there will be legacy information and the problem that the cluster cannot be established.

3 start to build a cluster to confirm whether each node can have the status of building a cluster.

Run on each machine to check the relevant status. Here the screenshot shows the status of OK. If you do not OK, you need to adjust your MYSQL through its error message.

4 create a new cluster and add relevant weights and whitelist information here

5 start to join other nodes

In fact, the above command to add a cluster can be summarized into four

Dba.createCluster ('repl', {memberWeight:80,ipWhitelist: "192.168.198.0lap24"})

Var cluster_v = dba.getCluster ()

Cluster_v.addInstance ('admin:1234.com@192.168.198.101:3306', {memberWeight:60})

Cluster_v.addInstance ('admin:1234.com@192.168.198.102:3306', {memberWeight:40})

Just these four commands and an INNODB CLUSTER has been successfully built, and what is actually done behind it.

This greatly reduces the difficulty and complexity of installing clusters, so it is a general trend to manage MGR clusters through mysqsh commands, and if you want to use them, you can't escape.

Finally, set the group-replication-consistency of the overall cluster (if you don't know what group-replication-consistency is, you can see my previous issue on this)

From the current 8.019 version of mysql, the cluster solution has basically been solidified, and the way of installation is becoming more and more automated, with a collection of blank commands after several commands. In the future, we will continue to study what the background has done and how to know what the problem is at that level.

After reading the above, do you have any further understanding of the detailed installation process of MYSQL 8 Innodb cluster mysqlsh and what is surrounding it? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report