配置


配置文件为ini格式,具体配置如下

  1. [MysqlCluster]
  2. default.writer=root:123456@tcp(127.0.0.1:3306)/test
  3. default.reader=root:123456@tcp(127.0.0.1:3306)/test
  4. hs.writer=rw:FEFen90jf29lnfi3if9f3hofh3f3@tcp(writer:3306)/hs?charset=utf8mb4
  5. hs.reader=ro:Enefeoiojeiofeonefenofeeiono@tcp(reader:2306)/hs?charset=utf8mb4
  6. live.writer=live_rw:feofefWEFEF#@fdfewoiffjfejlf@tcp(writer:3306)/live?charset=utf8mb4
  7. live.reader=live_ro:FEwofiofln29032rj#@efwfeffew@tcp(reader:3306)/live?charset=utf8mb4

配置格式为:[库名].[实例名]=[用户名]:[密码]@tcp([host]:[port])/[库名]?charset=[字符集]