Example - Sync from MySQL to Tacnode
This guide provides detailed instructions for setting up data synchronization from MySQL to Tacnode, including prerequisites, permissions, and configuration requirements.
Prerequisites
Network Configuration
Ensure network connectivity is properly configured. For detailed network setup instructions, see Data Sync Network Configuration.
Required Permissions
Permission requirements depend on the type of synchronization job:
Full Synchronization Only
For jobs that only perform full data synchronization, grant the following permissions:
Where:
${user}
: The username for the synchronization job${password}
: The password for the specified user
Full + Incremental Synchronization
For jobs that include incremental synchronization capabilities, additional replication permissions are required:
Enable Binary Logging (Required for Incremental Sync)
Incremental synchronization requires MySQL binary logging to be properly configured.
1. Verify Current Configuration
Check if binary logging is enabled and properly configured:
2. Required Parameter Values
Verify that the following parameters are set correctly:
Parameter | Required Value | Description |
---|---|---|
server_id | Non-empty positive integer | Unique identifier for the MySQL server |
log_bin | 1 (ON) | Enables binary logging |
binlog_format | ROW | Row-based replication format |
binlog_row_image | FULL | Complete row image for replication |
3. Configuration Updates
If any parameters don't match the required values:
Self-hosted MySQL:
- Update the
my.cnf
ormysqld.cnf
configuration file - Add or modify the required parameters:
- Restart the MySQL service
Cloud RDS (AWS, GCP, Azure):
- Access your cloud provider's RDS console
- Modify the database parameter group
- Update the required parameters
- Apply changes and restart the database instance
Data Source Configuration
Configure the MySQL connection using these required parameters:
Parameter | Description | Example |
---|---|---|
Host | MySQL server address | mysql.example.com |
Port | MySQL service port | 3306 (default) |
Username | User with required permissions | sync_user |
Password | Password for the specified user | secure_password |
Database | Target database name (optional) | production_db |
Default Object Mapping
Tacnode uses the following default mapping rule for MySQL objects:
Mapping Logic:
- Source:
database_name.table_name
(MySQL format) - Target:
database_name.public.table_name
(Tacnode format)
Example:
- MySQL table:
ecommerce.users
- Tacnode table:
ecommerce.public.users
Data Type Mapping
Tacnode automatically converts MySQL data types to compatible Tacnode types:
Numeric Types
MySQL Type | Tacnode Type | Notes |
---|---|---|
TINYINT | INT2 | 8-bit integer |
SMALLINT | INT2 | 16-bit integer |
MEDIUMINT | INT4 | 24-bit integer |
INT | INT4 | 32-bit integer |
BIGINT | INT8 | 64-bit integer |
TINYINT UNSIGNED | INT2 | Unsigned 8-bit |
SMALLINT UNSIGNED | INT4 | Unsigned 16-bit |
MEDIUMINT UNSIGNED | INT4 | Unsigned 24-bit |
INT UNSIGNED | INT8 | Unsigned 32-bit |
BIGINT UNSIGNED | NUMERIC | Unsigned 64-bit |
Decimal and Floating Point
MySQL Type | Tacnode Type | Notes |
---|---|---|
NUMERIC | NUMERIC | Exact numeric |
DECIMAL | NUMERIC | Exact decimal |
DECIMAL UNSIGNED | NUMERIC | Unsigned decimal |
FLOAT | FLOAT4 | Single precision |
FLOAT UNSIGNED | FLOAT4 | Unsigned single precision |
DOUBLE | FLOAT8 | Double precision |
DOUBLE UNSIGNED | FLOAT8 | Unsigned double precision |
Character and Text Types
MySQL Type | Tacnode Type | Notes |
---|---|---|
CHAR | CHAR | Fixed-length character |
VARCHAR | VARCHAR | Variable-length character |
TINYTEXT | TEXT | Short text |
TEXT | TEXT | Standard text |
MEDIUMTEXT | TEXT | Medium text |
LONGTEXT | TEXT | Long text |
Binary Data Types
MySQL Type | Tacnode Type | Notes |
---|---|---|
BINARY | BYTEA | Fixed-length binary |
VARBINARY | BYTEA | Variable-length binary |
TINYBLOB | BYTEA | Short binary data |
BLOB | BYTEA | Standard binary data |
MEDIUMBLOB | BYTEA | Medium binary data |
LONGBLOB | BYTEA | Long binary data |
Special Types
MySQL Type | Tacnode Type | Notes |
---|---|---|
ENUM | TEXT | Enumerated values as text |
SET | TEXT | Set values as text |
Next Steps
After configuring your MySQL data source:
- Test Connection: Verify connectivity using the Test Connection feature
- Select Objects: Choose which databases and tables to synchronize
- Configure Mapping: Customize object and column mappings if needed
- Set Policies: Configure synchronization behavior and conflict resolution
- Monitor Job: Track synchronization progress and performance
For detailed steps on these configuration phases, refer to the Data Sync Quick Start guide. | DATE | DATE | | DATETIME | TIMESTAMP | | TIMESTAMP | TIMESTAMPTZ | | TIME | TIME | | YEAR | INT2 | | JSON | JSONB |