I can not connect to my mysql cluster. I followed this tutorial : https://www.digitalocean.com/community/tutorials/how-to-create-a-multi-node-mysql-cluster-on-ubuntu-18-04 I tried connecting with workbench and mysql command to both data nodes and managment nodes on both 3306 and 1186 but I can cont connect to anywhere. Firewall is disabled on all machines. I created new user which can connect from anywhere but still no luck. Cluster works according to the test in the tutorial. To which node and port should i try to connect? Or is something missing in that tutorial?
Asked
Active
Viewed 932 times
0
-
The nodes are on private IPs. Are you connecting within the same network or from outside. (You can not connect from outside). If you are inside the network, have you tried telnet command to one of the nodes to see you can connect? telnet node.ip.here 3306 – nafooesi Jun 19 '20 at 21:57
-
@nafooesi thank you so so much, was stuck on it for last 4 hours and your suggestion really helped. I tried telnet command and it spit out connection refused so I started googling and my problem was that my cluster was not binding to right address. Thank you. – Peťo Build Jun 19 '20 at 22:51
1 Answers
1
So I fixed it thanks to nafooesi. For everyone that has same problem I did this.
Tried on my managment node telnet localhost 3306
.
It said connection refused.
I have edited /etc/mysql/mysql.conf.d/mysqld.cnf.
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Find bind-address = 127.0.0.1 and rewrite it with bind-address = ip.of.managment.node
And with workbench and programming languages you connect to your managment node not data nodes as i previously thought.
Thanks once again nafooesi.

Peťo Build
- 11
- 3
-
You're welcome! Glad to be able to help. Service address binding addresses another aspect of security. The default is always binding to local ip 127.0.0.1, so that only local connection can be made (on the same node). – nafooesi Jun 19 '20 at 23:17