配置
配置文件为ini格式,具体配置如下
[MysqlCluster]
default.writer=root:123456@tcp(127.0.0.1:3306)/test
default.reader=root:123456@tcp(127.0.0.1:3306)/test
hs.writer=rw:FEFen90jf29lnfi3if9f3hofh3f3@tcp(writer:3306)/hs?charset=utf8mb4
hs.reader=ro:Enefeoiojeiofeonefenofeeiono@tcp(reader:2306)/hs?charset=utf8mb4
live.writer=live_rw:feofefWEFEF#@fdfewoiffjfejlf@tcp(writer:3306)/live?charset=utf8mb4
live.reader=live_ro:FEwofiofln29032rj#@efwfeffew@tcp(reader:3306)/live?charset=utf8mb4
配置格式为:[库名].[实例名]=[用户名]:[密码]@tcp([host]:[port])/[库名]?charset=[字符集]