“This is the 16th day of my participation in the First Challenge 2022. For details: First Challenge 2022”

Abstract: Many DBA and development students often encounter the problem of real-time synchronization from one database to another database. Homogeneous data is relatively easy, but it is difficult to synchronize heterogeneous data, multiple tables and large amount of data. Tapdata Cloud, a real-time data synchronization tool, can easily synchronize MySQL data to MySQL in real time. I hope it will be helpful to you.

The real-time synchronization of MySQL data to MySQL took only a few minutes. The tool used is the Tapdata Cloud, which is free forever.

@[TOC](MySQL to MySQL real-time data synchronization practice sharing)

Step 1: Configure the MySQL connection

1. Click [Connection Management] in the left menu bar of Tapdata Cloud operation background, and then click [Create Connection] in the upper right corner of [Connection List] in the right area to open the connection type selection page and select MySQL

2. On the connection information configuration page that is displayed, enter the required configuration information

[Connection name] : Indicates the name of the connection. The name of multiple connections must be unique

Database address: indicates the DATABASE IP address/Host

[Port] : database port

[Database name] : TapData Database connection takes a DB as a data source. Db here refers to the database in a database instance, not a mysql instance.

[Account Number] : account that can access the database

Key code: password of the database account

[Time zone] : Time zone of the database is used by default. If the time zone is specified, the specified time zone is used

Test the connection, prompting the test to pass

Save the connection after the test passes.

Step 2: Configure the MySQL connection

3. As in the first step, click “Connection Management” in the left menu bar, and then click “Create Connection” in the upper right corner of “Connection List” in the right area to open the connection type selection page and select MySQL

4. On the connection information configuration page that is displayed, enter the required configuration information. After the configuration is complete, save the test connection.

Step 3: Select the synchronization mode – full/Incremental/Full + Increment

Enter the Tapdata Cloud operation background task management page and click the Add Task button to enter the task setting process

According to the connection just established, select the source and destination.

Select the libraries and tables to be synchronized based on data requirements. If you need to modify table names, you can set the table names of the target end in batches by using the table name batch modification function on the page.

After setting the above options, select the synchronization type. The platform provides full synchronization, incremental synchronization, and full + incremental synchronization, and set the write mode and read quantity.

If full and incremental synchronization is selected, Tapdata Agent automatically enters the incremental synchronization state after the full task is executed. In this state, Tapdata Agent will continuously monitor data changes (including write, update and delete) at the source end and write these data changes to the target end in real time.

Click the task name to open the task details page and view the detailed task information.

Click Task Monitoring to view the task execution details page and view the task progress and milestones.

Step 4: Verify data

After the completion of the general synchronization, I am used to the data check, to prevent stepping pits.

There are three verification modes in Tapdata Cloud. I often use the fastest fast count verification, which is simple and convenient. I only need to select the table to be verified without setting other complicated parameters and conditions.

MySQL data is synchronized to MySQL in real time, compared to their own code, simply not too convenient. Code word is not easy, reproduced please indicate the source ~

Synchronization operations for other databases

Other database data is synchronized to Oracle, MySQL, PG, SQL Server, MongoDB, ES, Damun, Kafka, GP, MQ, ClickHouse, Hazelcast Cloud, ADB MySQL, ADB in real time PostgreSQL, KunDB, TiDB, and Dummy DB all use the same synchronization mode: full/increment/full + increment. DB2, Sybase, and Gbase databases are locked in grey state. They are under development. Synchronization of these databases will be supported in the future. The Tapdata Cloud promises to be free forever, but the enterprise version is also available for the more demanding and budget-conscious, and you can apply for a trial. If you feel useful please collect likes and comments, database related problems contact me at any time ~!