文档中心MogDBMogDB StackUqbar
v2.0

文档:v2.0

支持的版本:

其他版本:

主备集群

一主一备

global:
  # 集群名
  cluster_name: c1
  # 操作系统用户名
  user: omm
  # 系统用户密码
  user_password: "" # ptk encrypt password
  # 数据库密码
  db_password: ""  # ptk encrypt password
  # 数据库端口
  db_port: 26000
  # 数据库安装基础目录
  base_dir: /data/mogdb

db_servers:
  - host: <IP1>
    # 数据库角色,支持: primary, standby, cascade_standby
    role: primary
    # SSH connection configuration
    ssh_option:
      port: 22
      user: root
      password: ""  # ptk encrypt password
      key_file: ""
      passphrase: ""
  - host: <IP2>
    role: standby
    ssh_option:
      port: 22
      user: root
      password: "" # ptk encrypt password
      key_file: ""
      passphrase: ""

一主两备一级联

global:
  # 集群名
  cluster_name: shockley
  # 操作系统用户名
  user: vimiix
  # 系统用户密码
  user_password: "" # ptk encrypt password
  # 数据库密码
  db_password: ""  # ptk encrypt password
  # 数据库端口
  db_port: 26000
  # 数据库安装基础目录
  base_dir: /data/mogdb
  # SSH 登录信息,这里我们演示所有数据库服务器的登录信息均相同
  # 所以仅需在 global 里配置一份即可
  ssh_option:
    port: 22
    user: root
    password: ""  # ptk encrypt password
    key_file: ""
    passphrase: ""

db_servers:
  - host: <IP1>
    role: primary
  - host: <IP2>
    role: standby
  - host: <IP3>
    role: standby
  - host: <IP4>
    role: cascade_standby
    # 当前级联备的上游备库IP
    upstream_host: <IP3>
Copyright © 2011-2024 www.enmotech.com All rights reserved.