TencentDB TD-SQL
TapData Cloud offers you cloud services that are suitable for scenarios requiring rapid deployment and low initial investment, helping you focus more on business development rather than infrastructure management. Free trial with TapData Cloud.TapData Enterprise can be deployed in your local data center, making it suitable for scenarios with strict requirements on data sensitivity or network isolation. It can serve to build real-time data warehouses, enable real-time data exchange, data migration, and more.TapData Community is an open-source data integration platform that provides basic data synchronization and transformation capabilities. This helps you quickly explore and implement data integration projects. As your project or business grows, you can seamlessly upgrade to TapData Cloud or TapData Enterprise to access more advanced features and service support.Please follow the instructions below to ensure successful addition and use of the distributed database TD-SQL version database in TapData.
Supported Versions
TencentDB TD-SQL 5.7.x, 8.0.x
As a Data Source
- Enable the Binlog feature on the source database.
Create an Account
For MySQL 8 and later, password encryption is different. Make sure to use the corresponding method for your version to set the password; otherwise, incremental synchronization may fail. Use the following commands to confirm whether supplemental logging is enabled.
For 5.x Versions
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
For 8.x Versions
-- Create the user
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
-- Change the password
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Granting Permissions
Grant SELECT
permissions for a specific database:
GRANT SELECT, SHOW VIEW, CREATE ROUTINE, LOCK TABLES ON <DATABASE_NAME>.<TABLE_NAME> TO 'tapdata' IDENTIFIED BY 'password';
Grant global privileges:
GRANT RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'tapdata' IDENTIFIED BY 'password';
Constraint Explanation
When synchronizing from MySQL to other heterogeneous databases, if the source MySQL database has table-level cascade settings, data updates and deletes triggered by this cascade will not be propagated to the target. If you need to build cascading processing capabilities on the target side, you can use triggers or other methods to achieve this type of data synchronization.
As a Target
Grant full privileges for a specific database:
GRANT ALL PRIVILEGES ON <DATABASE_NAME>.<TABLE_NAME> TO 'tapdata' IDENTIFIED BY 'password';
Grant global privileges:
GRANT PROCESS ON *.* TO 'tapdata' IDENTIFIED BY 'password';
Common Errors
"Unknown error 1044"
If permissions are granted correctly but you're still unable to pass the test connection through TapData, you can use the following steps to check and fix the issue:
SELECT host, user, Grant_priv, Super_priv FROM mysql.user WHERE user='username';
-- Check if the value of the Grant_priv field is 'Y'
-- If not, execute the following command
UPDATE mysql.user SET Grant_priv='Y' WHERE user='username'; FLUSH PRIVILEGES;