Talking to customers and users of MySQL they all want to have HA, the normal demands are:
- Do not want to alter application code
- Easy to install and manage
Getting started with MySQL Fabric, I consumed the following blogs and docs:
High-availability groups are very important part of MySQL fabric, these are collections of servers that shall work together to deliver a database service to the application that connects to MySQL Fabric.
In next post we will look at a python application and see how this works MySQL Fabric.
That was a bit of background but now we need to get started, first we need is 4 MySQL instances, I installed everything underneath /opt/fabric, see configuration options for my MySQL instances bellow.
Next step is to fetch MySQL Fabric code from here, MySQL Fabric is part of the latest release of MySQL Utilities called 1.4.1 alpha.
I opted for tar-file so used installation manual here, next step is to download and install Fabric aware connectors for Python, I again followed the manual here.
Now we are finally ready to start playing with MySQL fabric.
First we need to do some minor changes to MySQL Fabric configuration file (for me this was located at /etc/mysql/fabric.cfg), under section Storage you need to change address to your MySQL backing store (for me this is localhost:63306) and also see to if you have appropriate setting for user, password and database under the same section, you will need these in next step.
Lets configure our backing store for MySQL Fabric, I will use MySQL on port 63306 as backing store. All that's needed to do manually is creating the database with same name as in configuration above and also grants usage for the user created in configuration above.
Once this step is done we can proceed to initiate our backing store before we can finally start our fabric instance.
Next step is to create our HA group and add our 3 MySQL instances.
After this step you should see Fabric is running and one of your MySQL instances have been elected as primary and the other ones are slaves.
We now have a running MySQL fabric and all our MySQL instances are ready to start working!
In the next blog post (Part II) we will create a example application and look at some failover scenarios.
See you soon!