我使用chameleon将MySQL迁移至openGauss,日志没报错,但openGauss一直没有数据 环境:CentOS7.6虚拟机,openGauss3.0,MySQL5.7,Chameleon_3.0.0 其中openGauss和MySQL装在同一台虚拟机中,迁移时使用的也是同一台虚拟机。
chameleon配置文件和迁移日志如下:
-----default.yml文件内容如下:--------- --- # global settings pid_dir: '~/.pg_chameleon/pid/' log_dir: '~/.pg_chameleon/logs/' log_dest: file log_level: debug log_days_keep: 10 rollbar_key: '' rollbar_env: ''
# type_override allows the user to override the default type conversion # into a different one.
type_override: "tinyint(1)": override_to: boolean override_tables: - "*"
# postgres destination connection pg_conn: host: "127.0.0.1" port: "5432" user: "opengauss_test" password: "gauss_123" database: "opengauss_database" charset: "utf8"
sources: mysql: readers: 4 writers: 4 db_conn: host: "127.0.0.1" port: "3306" user: "mysql57_user" password: "FireLight@Gwl99" charset: 'utf8' connect_timeout: 10000 schema_mappings: db_mysql57_test: sch_mysql57_test limit_tables: skip_tables: grant_select_to: lock_timeout: "120s" my_server_id: 100 replica_batch_size: 10000 replay_max_rows: 10000 batch_retention: '1 day' copy_max_memory: "300M" copy_mode: 'file' out_dir: /tmp sleep_loop: 1 on_error_replay: continue on_error_read: continue auto_maintenance: "disabled" gtid_enable: false type: mysql keep_existing_schema: No migrate_default_value: No
-------default.yml文件内容结束------- ====================================================== -----------default_mysql.log 日志文件内容如下:----------- 2022-05-23 12:12:13 MainProcess INFO: Trying to add a new source 2022-05-23 12:12:13 MainProcess DEBUG: Checking if the source mysql already exists 2022-05-23 12:12:13 MainProcess WARNING: The source mysql already exists 2022-05-23 12:12:20 MainProcess INFO: Initialising the replica for source mysql 2022-05-23 12:12:20 MainProcess DEBUG: starting init replica for source mysql 2022-05-23 12:12:20 MainProcess DEBUG: There is already a database connection active. 2022-05-23 12:12:20 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 12:12:20 MainProcess DEBUG: mysql version 5007038 2022-05-23 12:12:20 MainProcess INFO: deleting all the table references from the replica catalog for source mysql 2022-05-23 12:12:20 MainProcess DEBUG: Creating the loading schema _sch_linux_database_tmp. 2022-05-23 12:12:20 MainProcess DEBUG: Creating the destination schema sch_linux_database. 2022-05-23 12:12:20 MainProcess INFO: Swapping schema sch_linux_database with _sch_linux_database_tmp 2022-05-23 12:12:20 MainProcess DEBUG: Renaming schema sch_linux_database in _rename_sch_linux_database 2022-05-23 12:12:20 MainProcess DEBUG: Renaming schema _sch_linux_database_tmp in sch_linux_database 2022-05-23 12:12:20 MainProcess DEBUG: Renaming schema _rename_sch_linux_database in _sch_linux_database_tmp 2022-05-23 12:12:20 MainProcess DEBUG: Commit the swap transaction 2022-05-23 12:12:20 MainProcess DEBUG: Dropping the schema _sch_linux_database_tmp. 2022-05-23 12:12:20 MainProcess DEBUG: Changing the lock timeout for the session to 120s. 2022-05-23 12:12:20 MainProcess DEBUG: New log table : t_log_replica_mysql_1 2022-05-23 12:12:20 MainProcess INFO: Saved master data for source: mysql 2022-05-23 12:12:20 MainProcess DEBUG: Binlog file: mysql-bin.000001 2022-05-23 12:12:20 MainProcess DEBUG: Binlog position:1199 2022-05-23 12:12:20 MainProcess DEBUG: Last event: None 2022-05-23 12:12:20 MainProcess DEBUG: Next log table name: t_log_replica_mysql_1 2022-05-23 12:12:20 MainProcess DEBUG: Next batch id: 2 2022-05-23 12:12:20 MainProcess INFO: Set high watermark for source: mysql 2022-05-23 12:12:20 MainProcess INFO: init replica for source mysql is complete 2022-05-23 12:16:52 MainProcess DEBUG: There is already a database connection active. 2022-05-23 12:16:52 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 12:16:52 MainProcess INFO: retrieving foreign keys metadata for schemas 'db_mysql57_test' 2022-05-23 12:16:52 MainProcess DEBUG: There is already a database connection active. 2022-05-23 12:16:52 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 12:16:52 MainProcess DEBUG: Deleting the source mysql 2022-05-23 12:16:52 MainProcess DEBUG: There is already a database connection active. 2022-05-23 12:17:32 MainProcess INFO: Trying to add a new source 2022-05-23 12:17:32 MainProcess DEBUG: Checking if the source mysql already exists 2022-05-23 12:17:32 MainProcess DEBUG: Adding source mysql 2022-05-23 12:17:40 MainProcess INFO: Initialising the replica for source mysql 2022-05-23 12:17:40 MainProcess DEBUG: starting init replica for source mysql 2022-05-23 12:17:40 MainProcess DEBUG: There is already a database connection active. 2022-05-23 12:17:40 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 12:17:40 MainProcess DEBUG: mysql version 5007038 2022-05-23 12:17:40 MainProcess INFO: deleting all the table references from the replica catalog for source mysql 2022-05-23 12:17:40 MainProcess DEBUG: Creating the loading schema _sch_mysql57_test_tmp. 2022-05-23 12:17:40 MainProcess DEBUG: Creating the destination schema sch_mysql57_test. 2022-05-23 12:17:41 reader-1 INFO: Copying the source table tb_customer into _sch_mysql57_test_tmp.tb_customer 2022-05-23 12:17:41 reader-1 DEBUG: estimating rows in db_mysql57_test.tb_customer 2022-05-23 12:17:41 reader-1 DEBUG: The table db_mysql57_test.tb_customer will be copied in 1 estimated slice(s) of 256 rows, using a transaction True 2022-05-23 12:17:41 reader-1 DEBUG: locking the table `db_mysql57_test`.`tb_customer` 2022-05-23 12:17:41 reader-1 DEBUG: collecting the master's coordinates for table `db_mysql57_test`.`tb_customer` 2022-05-23 12:17:41 reader-1 DEBUG: Executing query for table db_mysql57_test.tb_customer 2022-05-23 12:17:41 reader-1 DEBUG: set isolation level 2022-05-23 12:17:41 reader-1 DEBUG: beginning transaction 2022-05-23 12:17:41 reader-1 DEBUG: unlocking the tables 2022-05-23 12:17:41 reader-1 DEBUG: rolling back 2022-05-23 12:17:41 writer-3 DEBUG: Building DDL for index PRIMARY 2022-05-23 12:17:41 writer-3 INFO: Building index pk_tb_customer_1653279461_0 on _sch_mysql57_test_tmp.tb_customer 2022-05-23 12:17:41 writer-1 DEBUG: Table db_mysql57_test.tb_customer copied 1 slice of 1 2022-05-23 12:17:41 MainProcess INFO: Swapping schema sch_mysql57_test with _sch_mysql57_test_tmp 2022-05-23 12:17:41 MainProcess DEBUG: Renaming schema sch_mysql57_test in _rename_sch_mysql57_test 2022-05-23 12:17:41 MainProcess DEBUG: Renaming schema _sch_mysql57_test_tmp in sch_mysql57_test 2022-05-23 12:17:41 MainProcess DEBUG: Renaming schema _rename_sch_mysql57_test in _sch_mysql57_test_tmp 2022-05-23 12:17:41 MainProcess DEBUG: Commit the swap transaction 2022-05-23 12:17:41 MainProcess DEBUG: Dropping the schema _sch_mysql57_test_tmp. 2022-05-23 12:17:41 MainProcess DEBUG: Changing the lock timeout for the session to 120s. 2022-05-23 12:17:41 MainProcess DEBUG: New log table : t_log_replica_mysql_2 2022-05-23 12:17:41 MainProcess INFO: Saved master data for source: mysql 2022-05-23 12:17:41 MainProcess DEBUG: Binlog file: mysql-bin.000001 2022-05-23 12:17:41 MainProcess DEBUG: Binlog position:1199 2022-05-23 12:17:41 MainProcess DEBUG: Last event: None 2022-05-23 12:17:41 MainProcess DEBUG: Next log table name: t_log_replica_mysql_2 2022-05-23 12:17:41 MainProcess DEBUG: Next batch id: 1 2022-05-23 12:17:41 MainProcess INFO: Set high watermark for source: mysql 2022-05-23 12:17:41 MainProcess INFO: init replica for source mysql is complete 2022-05-23 14:27:45 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:27:45 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 14:27:45 MainProcess INFO: retrieving foreign keys metadata for schemas 'db_mysql57_test' 2022-05-23 14:27:45 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:27:45 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 14:27:45 MainProcess DEBUG: Deleting the source mysql 2022-05-23 14:27:45 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:41:58 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:42:36 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:44:37 MainProcess INFO: Initialising the replica for source mysql 2022-05-23 14:44:37 MainProcess DEBUG: starting init replica for source mysql 2022-05-23 14:44:37 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:44:37 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 14:44:37 MainProcess DEBUG: mysql version 5007038 2022-05-23 14:44:37 MainProcess INFO: deleting all the table references from the replica catalog for source mysql 2022-05-23 14:44:37 MainProcess DEBUG: Creating the loading schema _sch_mysql57_test_tmp. 2022-05-23 14:44:37 MainProcess DEBUG: Creating the destination schema sch_mysql57_test. 2022-05-23 14:44:37 reader-3 INFO: Copying the source table tb_customer into _sch_mysql57_test_tmp.tb_customer 2022-05-23 14:44:37 reader-3 DEBUG: estimating rows in db_mysql57_test.tb_customer 2022-05-23 14:44:37 reader-3 DEBUG: The table db_mysql57_test.tb_customer will be copied in 1 estimated slice(s) of 256 rows, using a transaction True 2022-05-23 14:44:37 reader-3 DEBUG: locking the table `db_mysql57_test`.`tb_customer` 2022-05-23 14:44:37 reader-3 DEBUG: collecting the master's coordinates for table `db_mysql57_test`.`tb_customer` 2022-05-23 14:44:37 reader-3 DEBUG: Executing query for table db_mysql57_test.tb_customer 2022-05-23 14:44:37 reader-3 DEBUG: set isolation level 2022-05-23 14:44:37 reader-3 DEBUG: beginning transaction 2022-05-23 14:44:37 reader-3 DEBUG: unlocking the tables 2022-05-23 14:44:37 reader-3 DEBUG: rolling back 2022-05-23 14:44:38 writer-1 DEBUG: Building DDL for index PRIMARY 2022-05-23 14:44:38 writer-1 INFO: Building index pk_tb_customer_1653288278_0 on _sch_mysql57_test_tmp.tb_customer 2022-05-23 14:44:38 writer-2 DEBUG: Table db_mysql57_test.tb_customer copied 1 slice of 1 2022-05-23 14:44:38 MainProcess INFO: Swapping schema sch_mysql57_test with _sch_mysql57_test_tmp 2022-05-23 14:44:38 MainProcess DEBUG: Renaming schema sch_mysql57_test in _rename_sch_mysql57_test 2022-05-23 14:44:38 MainProcess DEBUG: Renaming schema _sch_mysql57_test_tmp in sch_mysql57_test 2022-05-23 14:44:38 MainProcess DEBUG: Renaming schema _rename_sch_mysql57_test in _sch_mysql57_test_tmp 2022-05-23 14:44:38 MainProcess DEBUG: Commit the swap transaction 2022-05-23 14:44:38 MainProcess DEBUG: Dropping the schema _sch_mysql57_test_tmp. 2022-05-23 14:44:38 MainProcess DEBUG: Changing the lock timeout for the session to 120s. 2022-05-23 14:44:38 MainProcess DEBUG: New log table : t_log_replica_mysql_2 2022-05-23 14:44:38 MainProcess INFO: Saved master data for source: mysql 2022-05-23 14:44:38 MainProcess DEBUG: Binlog file: mysql-bin.000002 2022-05-23 14:44:38 MainProcess DEBUG: Binlog position:154 2022-05-23 14:44:38 MainProcess DEBUG: Last event: None 2022-05-23 14:44:38 MainProcess DEBUG: Next log table name: t_log_replica_mysql_2 2022-05-23 14:44:38 MainProcess DEBUG: Next batch id: 1 2022-05-23 14:44:38 MainProcess INFO: Set high watermark for source: mysql 2022-05-23 14:44:38 MainProcess INFO: init replica for source mysql is complete 2022-05-23 14:53:26 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:53:26 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 14:53:26 MainProcess INFO: retrieving foreign keys metadata for schemas 'db_mysql57_test' 2022-05-23 14:53:26 MainProcess DEBUG: There is already a database connection active. 2022-05-23 14:53:26 MainProcess DEBUG: Collecting schema mappings for source mysql 2022-05-23 14:53:26 MainProcess DEBUG: Deleting the source mysql 2022-05-23 14:53:26 MainProcess DEBUG: There is already a database connection active.
----------default_mysql.log 日志文件内容结束------------