?????????group_id-1?????????????????£?
????mysql -P 3306 -h 192.168.1.70 -u root -e "select count(*) from test.subscribers"
????????????
????+----------+
????| count(*) |
????+----------+
????| 794287 |
????+----------+
?????????group_id-2?????????????????£?
????mysql -P 3309 -h 192.168.1.76 -u root -e "select count(*) from test.subscribers"
????????????
????+----------+
????| count(*) |
????+----------+
????| 315752 |
????+----------+
????????????HA?饗group_id-3??????HA?饗group_id-1?????з???????????£?
????a??    ???????192.168.1.71 192.168.1.76 192.168.1.230????????????????????????group_id-3
????mysqlfabric group add group_id-3 192.168.1.71:3313
????mysqlfabric group add group_id-3 192.168.1.76:3315
????mysqlfabric group add group_id-3 192.168.1.230:3317
???????primary???
????mysqlfabric group promote group_id-3
????b??    ????HA??group_id-3???е?????????
????mysql -P 3313 -h 192.168.1.71 -u root -e "reset master"
????mysql -P 3315 -h 192.168.1.76 -u root -e "reset master"
????mysql -P 3317 -h 192.168.1.230 -u root -e "reset master"
????c??    ??HA?饗group_id-1????shard_id???????????fabric?????
????mysql -h 127.0.0.1 -P3306 -u root -e 'select * from fabric.shards'
????????????
????+----------+------------+---------+
????| shard_id | group_id | state |
????+----------+------------+---------+
????| 4 | group_id-1 | ENABLED |
????| 5 | group_id-2 | ENABLED |
????+----------+------------+---------+
????d??    ??HA?饗group_id-1?????з????????
????mysqlfabric sharding split_shard 4 group_id-3
????ps???????????з????????????????£?
????Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event '' at 4?? the last event read from './binlog.000003' at 621?? the last byte read from './binlog.000003' at 621.'
?????????????
??????master?????????dump?????????£?
????mysqldump -h 192.168.1.76 -u root -P3315 --all-databases --flush-privileges --single-transaction --flush-logs --triggers --routines --events --hex-blob >/data/database/full_backup_master.sql
???????slave??
????mysql -P 3317 -h 192.168.1.230 -u root -e "stop slave"
????mysql -P 3317 -h 192.168.1.230 -u root -e "reset master"
????mysql -P 3317 -h 192.168.1.230 -u root </data/full_backup_master.sql
????mysql -P 3317 -h 192.168.1.230 -u root -e "start slave"
?????????з?????????′???
????Procedure :
????{ uuid = 4da230c2-31c3-4242-bd88-ccafd51bfac1??
????finished = True??
????success = False??
????return = BackupError: ('Error while restoring the backup using the mysql client ?? %s'?? "ERROR 1840 (HY000) at line 24 in file: 'MySQL_192.168.1.76_3306.sql': @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty. ")??
????activities =
????}
?????????????
??????HA?饗group_id-3????????????????????“reset master”??????????
????e)    ????HA????group_id-1??group_id-2??group_id-3?????????100?????
????group_id-1???????????????У?
????mysql -P 3306 -h 192.168.1.70 -u root -e "select count(*) from test.subscribers where sub_no between 20000 and 20100"
????????????
????+----------+
????| count(*) |
????+----------+
????| 70 |
????+----------+
????group_id-2??group_id-3???????????????У?
????mysql -P 3309 -h 192.168.1.76 -u root -e "select count(*) from test.subscribers where sub_no between 20000 and 20100"
????mysql -P 3313 -h 192.168.1.230 -u root -e "select count(*) from test.subscribers where sub_no between 20000 and 20100"
????????????
????+----------+
????| count(*) |
????+----------+
????| 30 |
????+----------+
??????select???????HA??group_id-2??group_id-3????????????????
????3.hash??????????
?????????1??????????HA?饗group_id-1????????7138???????HA?饗group_id-2????????2903?????
?????????10??????????HA?饗group_id-1????????78719???????HA?饗group_id-2????????31321?????
?????????100??????????HA?饗group_id-1????????794287???????HA?饗group_id-2????????315752?????
??????????mysql fabric????????hash?????????????7:3?????????????????
????????????PHP??Erlang?????????????MySQL Fabric
??????Fabric????Php?? Java?? Python???????API???????????????????????Fabric??
????python????????????
????Connector/Python:http://dev.mysql.com/doc/mysql-utilities/1.5/en/connector-python-fabric.html
????Connector/J:http://dev.mysql.com/doc/mysql-utilities/1.5/en/connector-j-fabric.html
????Connector:http://php.net/manual/zh/book.mysqlnd-ms.php
???????mysqlfabric?????????
????1?????3???????????????????·????????
????2??????mysqlfabric??ips