Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18788

MySQL Router bootstrap &“conf-set-option”

$
0
0

I thought I’d share a quick addition to the MySQL Router bootstrap command and hope it helps others, as always.

First of all, you all know the MySQL Router documentation, and have probably looked into a specific option when executing commands, but I’ve found one quite handy that allows me to add in certain parametrization for my routers: –conf-set-option

It’s simple to use, so I’ll just share what I used as a reference and let you play away.

mysqlrouter --bootstrap icadmin:'MyP4ssword!'@node01:3306 \
--name="router_node1" --account=routerAdmin \
--conf-base-port=3306 --report-host=rtnode01 --conf-use-gr-notifications \
--conf-set-option=destination_status.error_quarantine_threshold=5 \
--conf-set-option=destination_status.error_quarantine_interval=20 \
--conf-set-option=connection_pool.max_idle_server_connections=64 \
--conf-set-option=connection_pool.idle_timeout=10 \
--conf-set-option=DEFAULT.max_connect_errors=100000 \
-u mysqlrouter

And if you’re using ClusterSets like I am, then once you’ve created your clusterset, you’re going to have to rebootstrap the router, this time with force:

systemctl stop mysqlrouter

mysqlrouter --bootstrap icadmin:'MyP4ssword!'@node01:3306 \
--name="router_node01" --account=routerAdmin \
--conf-base-port=3306 --report-host=rtnode01 --conf-use-gr-notifications \
--conf-set-option=destination_status.error_quarantine_threshold=5 \
--conf-set-option=destination_status.error_quarantine_interval=20 \
--conf-set-option=connection_pool.max_idle_server_connections=64 \ 
--conf-set-option=connection_pool.idle_timeout=10 \
--conf-set-option=DEFAULT.max_connect_errors=100000 \
--force -u mysqlrouter

systemctl start mysqlrouter

And if you tail your /etc/mysqlrouter/mysqlrouter.conf file you’ll see the new [destimation_status] & [connection_pool] sections as well as the modified parameters at the end of each existing section [DEFAULT].

This could help the low-coders / IaC teams out there…

Ta-da!


Viewing all articles
Browse latest Browse all 18788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>