Check If SQL server in Percona cluster is in bootstrap mode

Still getting to learn this so I apologize if this is an easy question. How can I make sure none of my SQL nodes are running in bootstrap mode? I ran a service mysql status on all 3 nodes in percona cluster 5.7 and they all show mysql.service - Percona XtraDB Cluster and active. Not sure how else to check. I need to reboot all the nodes 1 at a time but was wanting to verify none were in bootstrap mode.

Thank you!

1 Like

You’re on the correct path.

systemctl status mysql


systemctl status mysql@bootstrap

Which one is ‘Running (Active)’? That’s how you can tell. :slight_smile:
The better question is why do you think it matters about being in bootstrap or not to do a rolling restart? It doesn’t. If node2 was in bootstrap mode, whatever, just restart it normally. (ie: stop mysql@bootstrap, start mysql). It only matters if you restart mysql@bootstrap. That would be bad but you have to actually issue that command; it’s not something that would happen automatically.

1 Like

@matthewb thank you for the response. I was more or less just checking as I didn’t want any running in bootstrap since it was unnecessary. Which leads me my next question. Is it best to “not” have mysql service starting on reboot incase say all 3 of our MySQL servers were down and needed to boot up but needed 2 of them to point at a specific node for data sync. Thus needing to check when mysql went down so you could bootstrap the one that had most recent data?

1 Like

@jasonfe33 If all 3 are set to start automatically, then you are technically ok. When a pxc node starts normally, it tries to make contact with other nodes listed in the gcomm:// address. If none respond, then after a timeout, the node shuts down. If all 3 happen to hit this state, then you can still step in and start the bootstrap normally.