DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Migrating several single standalone MySQL server to one Percona XtraDB Cluster

Migrating several single standalone MySQL server to one Percona XtraDB Cluster

Peter Zaitsev user avatar by
Peter Zaitsev
·
Dec. 19, 12 · Interview
Like (0)
Save
Tweet
Share
4.65K Views

Join the DZone community and get the full member experience.

Join For Free

some weeks ago i had to migrate some independent mysql servers (some standard mysql masters, and some just standalone) to a percona xtradb cluster of 3 nodes.

so the easiest way would be to configure each node to become also an asynchronous slave of one of the production servers.
like illustrated here:

but in this case there was one major issue, the tables where myisam and this is not really recommended with galera replication even if it’s now supported.

preparing the slaves would then become a loop:

for each production server
   restoring the dump on the node that will be the dedicated slave
   convert the table in innodb
   configure and start the replication 
   finally perform sst on the other nodes....

so in this case that should have be done 3 times… that could take some time ! and then, if the single production servers where more than 3 ?

so i decided to use a wonderful feature of mariadb 10: multi-source replication .

mariadb’s multi-source-replication doesn’t have any conflict resolution. the assumption is that there are no conflicts in data between the different masters. which is the case here, all standalone servers handle different schemas.

i configured the mariadb server to be slave of all production servers, changed the table engine to innodb on it and chose one node of the pxc to be the async slave of that mariadb server. it worked like a charm and the migration of production to percona xtradb cluster became very easy.

thank you mariadb’s team for this feature.

when a sever (a node) is member of a percona xtradb cluster is also standard slave (standard asynchronous replication of mysql), it can spread in the cluster all statements received from the master if log_slave_updates is enabled.

cluster XtraDB MySQL

Published at DZone with permission of Peter Zaitsev, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Upgrade Guide To Spring Data Elasticsearch 5.0
  • An Introduction to Data Mesh
  • 5 Factors When Selecting a Database
  • PHP vs React

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: