Connecting to cluster
I have set-up the cluster as instructed. How do I connect to mysql from my application server?
And How do I import the data from current mysql installation?
-
Hi Shantanu,
You can have your SQL nodes behind a loadbalancer, and your apps can connect via the loadbalancer.
If you want to use HA Proxy, you might want to check out:
https://github.com/severalnines/haproxy
It automatically sets up HA Proxy and adds the SQL nodes to its list of hosts.
If you have two app servers, we recommend you deploy an HA Proxy on each app server.
You might also be able to use a MySQL connector that takes care of connecting to multiple MySQL Servers, e.g. for JDBC:
jdbc:mysql:loadbalance://host-1,host-2,...host-n/database?loadBalanceBlacklistTimeout=5000
As for loading with data, here is a blog post that might help:
http://johanandersson.blogspot.se/2012/04/mysql-cluster-how-to-load-it-with-data.html
Best regards,
Vinay
Please sign in to leave a comment.
Comments
1 comment