Trove configuring MySQL Replica

Source: Internet
Author: User
Tags mysql version

First, Binlog mode
MySQL version 5.6 and later templates does not provide a binlog template, the default can only use Gtid mode, you can consider making your own template to use Binlog copy
1. Edit/etc/trove/trove-taskmanager.conf

[Default]...template_path =/etc/trove/templates/...

2. View MySQL version

trove datastore-list+--------------------------------------+-------+| id                                     | name  |+------- -------------------------------+-------+| b10f2f73-77cd-484c-9105-a33bc56e0fa4 | mysql |+- -------------------------------------+-------+trove datastore-version-list mysql+------------------- -------------------+-----------+| id                                     | name      |+------------------------- -------------+-----------+| 4ee1da20-df29-4e88-b3eb-795b2f4c12f2 | mysql-5.6 | |  a52b6fac-2601-4b5b-837c-95d5507d0269 | mysql-5.5 |+--------------------------------------+-----------+ 

3. Copy the MySQL profile template and execute it on the node running Trove-taskmanager

Cp-r trove/templates//etc/trove/cd/etc/trove/templates/mysqlcp-r 5.5 mysql-5.5 # mysql-5.5 according to datastore-version-list output Out OK

4. Edit/etc/trove/trove-guestagent.conf

[Mysql]...replication_strategy = Mysqlbinlogreplicationreplication_namespace = Trove.guestagent.strategies.replication.mysql_binlog

Second, Gtid mode
Not available for MySQL 5.5,mysql 5.5 does not support Gtid replication
1. Edit/etc/trove/trove-taskmanager.conf

[Default]...template_path =/etc/trove/templates/...

2. Copy the MySQL profile template and execute it on the node running Trove-taskmanager

Cp-r trove/templates//etc/trove/

3. Edit/etc/trove/trove-guestagent.conf

[Mysql]...replication_strategy = Mysqlgtidreplicationreplication_namespace = Trove.guestagent.strategies.replication.mysql_gtid

Third, create replication
1. mysql 5.5

Trove Create AB 6--size 5--databases myDB--users usera:password--datastore_version mysql-5.5--datastore MySQL Trove Create ab-slave1 6--size 5--replica_of ab--replica_count 1--datastore_version mysql-5.5--datastore mysq L

2. mysql 5.6

Trove Create AB 6--size 5--databases myDB--users usera:password--datastore_version mysql-5.6--datastore MySQL Trove Create ab-slave1 6--size 5--replica_of ab--replica_count 1--datastore_version mysql-5.6--datastore mysq L

Iv. Reference Links:
https://ly798.github.io/2017/01/20/trove-mysql-replication/


This article is from the "Wuling Grassland" blog, please make sure to keep this source http://penguintux.blog.51cto.com/3021117/1912109

Trove configuring MySQL Replica

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.