Search code examples
pythonmysqlmysql-cluster

Connecting to mysql cluster from python application


I have configured the server to use MySQL Cluster. The Cluster architecture is as follows:

One Cluster Manager(ip1)

Two Data Nodes (ip2,ip3)

Two SQL Nodes(ip4,ip5)

My Question: Which node should I use to connect from Python application?


Solution

  • You have to call SQL nodes from your application. Use comma separated ip addresses for this. In your code use DB_HOST = "ip4, ip5"