MySQL Database Synchronization

MySQL Synchronization

MySQL synchronization is a process of making two MySQL databases having identical contents. It’s a general idea that is realized differently in clustering, replication and other applications. Handy Backup synchronizes MySQL tables via backup and recovery.

Download Handy Backup

Version 7.19.0, built on 8 November, 2018
164 MB

Trivia for MySQL Synchronization

Basically, there are two methods to sync MySQL databases:

1

One-way synchronization is used when a database being synchronized doesn’t receive any changes from MySQL clients, or receives an insignificant amount of changes that can be lost.

For example, in a Master-to-Slave replication configuration, there is a Master database that receives data from MySQL-based applications and acts as data source for Slave databases that act as read-only storage.

2

Two-way synchronization implies that both databases can be modified by MySQL clients and any record made to one database must be inserted into the other.

Learn more about MySQL Backup Software.

Data Synchronization in Clustering Configuration

MySQL clusters are built of several MySQL servers (SQL nodes) that are configured in such a way that all storage, processing and management operations are shared amongst all of them.

Storage Engines

The storage engine used in all tables is called Network DataBase (NDB): it’s an in-memory engine which tracks changes made to any clustered server and automatically synchronizes all other servers, so at any time they have identical contents.

Caveat! Synchronization in a MySQL cluster is performed automatically and doesn’t require any additional setup. It is important, however, to remember that having a cluster does not remove the need for regular backup.

MySQL clusters

Clustering enables you to increase the database’s speed and availability, but it doesn’t protect from SQL injections and user mistakes. For instance, if you accidentally delete a table in one database, it will be deleted on all clustered servers too.

Synchronization in Replication Configuration

MySQL replication

Unlike clustering, MySQL replication configuration doesn’t expect all nodes to share one in-memory storage engine and be synchronized all the time. Oppositely, it is often recommended to set different storage engines for different servers, to distribute the roles between these servers.

Note: An optimal configuration for servers is the one where one of the servers processes all INSERTs and UPDATEs, while the others handle all reading operations.

Using the Replication

The reason for assigning different server roles is that storage engines perform much slower under concurrent reads and writes. Replication is a built-in feature of the database management system, in which synchronization of MySQL servers is made differently than through common SQL updates.

This technique analyzes changes made to the Master database and reproducing them on the Slave databases.

Caveat! When trying to synchronize MySQL databases, the replication engine doesn’t verify that they are identical, which can lead to unexpected errors. A common approach to setting up replication is to take a full backup of the Master Server and restore it on the Slave Servers.

Download Handy Backup

Version 7.19.0, built on 8 November, 2018
164 MB

The Role of Handy Backup

Handy Backup is the professional data backup and synchronization software. It contains an advanced MySQL plug-in that lets you dumping your databases into readable text files.

Handy Backup can be helpful in two aspects: it provides a fast way to perform the operation, and also creates very understandable backup files (database dumps) that can be modified by hand, which lets you easily change storage engine for your Slave Servers.

To learn more, please refer to MySQL Replication.

Choose MySQL plug-in - Handy Backup

Advantages and Functions of Handy Backup

Expanded MySQL Synchronization Tool

Expanded MySQL Synchronization Tool

MySQL synchronize two databases via Handy Backup by creating a dump (backup) of one base and then by restoring it. Thus, you can combine your MySQL synchronization with backup, encryption, advanced storage options (such as copying to FTPS/SFTP or an S3-driven cloud), batch processing etc.

Sync MySQL Databases by Schedule

You can tune a pair of MySQL database synchronization tasks to run at an exactly pre-defined time, with an exact interval from a single minute (which is often not recommended because too small lag between backup and restore parts of MySQL sync) to several months. You can also force missed tasks to run.

Sync MySQL Databases by Schedule

Recommended solution

Handy Backup Small Server

Version 7.19.0, built on 8 November, 2018. 164 MB
Backup Software from Novosoft LLC. 249 USD per license.

Handy Backup Small Business

To take advantage of the MySQL backup and recovery functions, you need the Small Server edition of our small business backup solutions. Try it for 30 days free of charge!

Physical (Cold) Backup and Synchronization of MySQL DBMS

There is an interesting approach that enables you to backup and synchronize MySQL databases very quickly by simply stopping the DBMS and copying its binary files to a different place.

  • The definition for this method is often physical backup, because it doesn’t work with the database’s programming interfaces, but treats it as common HDD files.

For many businesses the cost of a downtime of several minutes may result in huge losses, and this is another situation where MySQL replication proves its worth. An example scenario of combining replication and "cold" backups could be as follows:

  1. Set up Master-to-Slave replication configuration.
  2. When you need to make backups, stop the Slave Server.
  3. Let MySQL dump all data from the memory to the disk.
  4. Copy binary files of the Slave Server’s database to a safe place.
  5. Re-run the Slave server.

Note: Among other powerful features, Handy Backup can run third-party scripts and applications prior to and after running backup tasks. In the scenario described above, you can se this function to stop the MySQL server for "cold" backup and to restart it after the copying is complete.

Video Example

In the following video tutorial you can find how to back up and restore a MySQL database with Windows version of Handy Backup.

Download and install our software today - making your first backup will only take two minutes!

Licensing Information

As described above, synchronization of MySQL databases can’t replace backups. The recommended way to set up automated backup of your MySQL databases is to use one of the business-oriented editions of our software.

  • Try MySQL Backup in Small Business and Server Network editions - 30 days trial!
  • If you have only one server running a MySQL database, then you need Handy Backup Small Business
  • If you want to back up and synchronize multiple MySQL servers at once, then you need Handy Backup Server Network
  • To see pricing on these and other editions of our software, please refer to the Order section.
Download Handy Backup

Version 7.19.0, built on 8 November, 2018
164 MB

0 comments

    Who uses our backup software?