Last time we set up a High Availability server farm with MySQL Fabric. Now it is time to set up sharding. I will be using the good old World database and sharding the City table on the ID field. There are 4,079 cities in this table and they will be split in two. So one shard, that we will call CityLow will have the records 2,000 and below and the other records at 2,001 and above will be called CityHigh. We also need a global group for setting up sharding that will be called CityGlobal.
Sadly, the first step is to remove the previous setup with
mysqlfabric manage teardown. This
will remove the fabric database from the Fabric
controller. Fabric itself has to be stopped with
mysqlfabric manage stop. The
command mysqlfabric manage setup
will set up a fresh, clean fabric database. And …