# DataSync **Repository Path**: sakeofwhat/DataSync ## Basic Information - **Project Name**: DataSync - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-11 - **Last Updated**: 2021-08-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 同步两个DB之间的schema,配置如下: sourceHost=127.0.0.1:3306 sourceUser=root sourcePass=123123123 sourceSchema=temp_db sourceCharset=utf8 targetHost=127.0.0.1:3306 targetUser=root targetPass=123123123 targetSchema=temp_test targetCharset=utf8 autoExecute=true //此处表明自动同步 原理: 通过捞取information_schema来比较source_schema和target_schema(可在不同实例)的表结构是否一致, 如果target_schema没有则这张表则创建, 如果target_schema表里面没有这个字段则alter add(保证顺序), 如果表里面有这个字段、但属性不一样则alter change, 另外还同步索引的元数据.