标签: python mysql mysql-cluster
我已将服务器配置为使用MySQL Cluster。集群架构如下:
一个群集管理器(ip1)
两个数据节点(ip2,ip3)
两个SQL节点(ip4,ip5)
我的问题:我应该使用哪个节点从Python应用程序连接?
答案 0 :(得分:3)
您必须从应用程序中调用SQL节点。为此使用逗号分隔的IP地址。在你的代码中使用 DB_HOST =" ip4,ip5"