配置MySQL数据库高可用 sharding-proxy 5.0.0 config-database-discovery.yaml

Colin 8月前 ⋅ 130 阅读
#
#- !DB_DISCOVERY
#  dataSources:
#    pr_ds:
#      dataSourceNames:
#        - ds_0
#        - ds_1
#        - ds_2
#      discoveryTypeName: mgr
#  discoveryTypes:
#    mgr:
#      type: MGR
#      props:
#        groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
#        zkServerLists: 'localhost:2181'
#        keepAliveCron: '0/5 * * * * ?'

######################################################################################################
#
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
#
######################################################################################################

#schemaName: database_discovery_db
#
#dataSources:
#  ds_0:
#    url: jdbc:mysql://127.0.0.1:3306/demo_primary_ds?serverTimezone=UTC&useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 3000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#  ds_1:
#    url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_0?serverTimezone=UTC&useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 3000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#  ds_2:
#    url: jdbc:mysql://127.0.0.1:3306/demo_replica_ds_1?serverTimezone=UTC&useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 3000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#
#rules:
#- !DB_DISCOVERY
#  dataSources:
#    pr_ds:
#      dataSourceNames:
#        - ds_0
#        - ds_1
#        - ds_2
#      discoveryTypeName: mgr
#  discoveryTypes:
#    mgr:
#      type: MGR
#      props:
#        groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
#        zkServerLists: 'localhost:2181'
#        keepAliveCron: '0/5 * * * * ?'




全部评论: 0

    我有话说: