How to start the first node of the mariadb galera Cluster

Source: Internet
Author: User

How to start the first node of the mariadb galera Cluster
After setting up the mariadb galera cluster, how can I start the whole cluster after it is stopped? Which node should we start first? Today I try to stop all the cluster machines and then start a node at will, the following error is reported:

170620 21:32:55 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. it was not the last one to leave the cluster and may not contain all the updates. to force cluster bootstrap with this node, edit the grastate. dat file manually and set safe_to_bootstrap to 1.

This node is not the last node that leaves the cluster (the node that stops at last) and may not contain all updated data. It is forced to start from the node and needs to be edited manually. in the dat file, set safe_to_bootstrap = 1. Of course, we do not need to force the node to start. We will troubleshoot the grastate under each node one by one. dat file (the file is in the data directory), find the node safe_to_bootstrap = 1, and then start it on the node.

For example, node 3 is found here.
[Root @ hxl03 data] # more grastate. dat
# GALERA saved state
Version: 2.1
Uuid: 43caaa91-54bf-11e7-9321-c60bd8969b24
Seqno: 2919
Safe_to_bootstrap: 1

Start the node first, and then start other nodes one by one.
[Root @ hxl03 bin] #./mysqld_safe -- defaults-file =/opt/mariadb-galera/mariadb-galera-10031/conf/my. cnf -- wsrep-new-cluster -- user = maria &

-- The End --

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.