Doc Menu

Upstream Database Configuration File

This document introduces the configuration file of the upstream database, including a configuration file template and the description of each configuration parameter in this file.

Configuration file template

The following is a configuration file template of the upstream database:

source-id: "mysql-replica-01"

# Whether to enable GTID.
enable-gtid: false

from:
  host: "127.0.0.1"
  port: 3306
  user: "root"
  password: "ZqMLjZ2j5khNelDEfDoUhkD5aV5fIJOe0fiog9w=" # The user password of the upstream database. It is recommended to use the password encrypted with dmctl. 
  security:                       # The TLS configuration of the upstream database
    ssl-ca: "/path/to/ca.pem"
    ssl-cert: "/path/to/cert.pem"
    ssl-key: "/path/to/key.pem"

Configuration parameters

This section describes each configuration parameter in the configuration file.

Global configuration

ParameterDescription
source-idRepresents a MySQL instance ID.
enable-gtidDetermines whether to pull binlog from the upstream using GTID. The default value is false. In general, you do not need to configure enable-gtid manually. However, if GTID is enabled in the upstream database, and the primary/secondary switch is required, you need to set enable-gtid to true.
hostSpecifies the host of the upstream database.
portSpecifies the port of the upstream database.
userSpecifies the username of the upstream database.
passwordSpecifies the user password of the upstream database. It is recommended to use the password encrypted with dmctl.
securitySpecifies the TLS config of the upstream database.