After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 243 of 317

Chapter 11 233 user haproxy group haproxy daemon #debug #quiet defaults log global mode http option tcplog option dontlognull retries 3 option redispatch maxconn 4096 timeout connect 50000ms timeout client 50000ms timeout server 50000ms listen mysql 0.0.0.0:3306 mode tcp balance roundrobin option tcpka option mysql-check user haproxy server galera1 172.16.0.21:3306 weight 1 server galera2 172.16.0.22:3306 weight 1 server galera3 172.16.0.23:3306 weight 1 3. Save and exit the file and start up HA Proxy, as follows: sudo sed -i 's/^ENABLED.*/ENABLED=1/' /etc/defaults/haproxy sudo service haproxy start 4. Before we can use this HA Proxy server to access our three MySQL nodes, we must create the user specified in the haproxy.cfg file that is used to do a very simple check to see if MySQL is up. To do this, we add a user into our cluster that is simply able to connect to MySQL. Using the ClusterControl interface, or using the mysql client and attaching to any of the MySQL instances in our cluster, create the user haproxy with no password set that is allowed access from the IP address of the HA Proxy server. 5. At this point, we can use a MySQL client and point this to the HA Proxy address. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook