EXPORT DATABASE CONFIGURATION

    语法

    示例

    • 导出指定逻辑库的存储单元和规则配置到指定路径
    1. EXPORT DATABASE CONFIGURATION FROM sharding_db TO FILE "/xxx/config_sharding_db.yaml";
    • 导出指定逻辑库的存储单元和规则配置到屏幕
    1. mysql> EXPORT DATABASE CONFIGURATION FROM sharding_db;
    2. +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    3. | result |
    4. | databaseName: sharding_db
    5. dataSources:
    6. password: 123456
    7. url: jdbc:mysql://127.0.0.1:3306/migration_ds_0
    8. username: root
    9. minPoolSize: 1
    10. connectionTimeoutMilliseconds: 30000
    11. maxLifetimeMilliseconds: 2100000
    12. readOnly: false
    13. idleTimeoutMilliseconds: 60000
    14. maxPoolSize: 50
    15. ds_2:
    16. password: 123456
    17. username: root
    18. minPoolSize: 1
    19. maxLifetimeMilliseconds: 2100000
    20. readOnly: false
    21. idleTimeoutMilliseconds: 60000
    22. maxPoolSize: 50
    23. rules:
    24. |
    25. +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    26. 1 row in set (0.00 sec)
    • 导出当前逻辑库的存储单元和规则配置到指定路径
    • 导出当前逻辑库的存储单元和规则配置到屏幕
    1. EXPORT DATABASE CONFIGURATION;

    相关链接