1

Following the guide to create a mysql NDB cluster on https://hub.docker.com/r/mysql/mysql-cluster/ after initializing docker server exposing 3306 and 33060 I'm still unable to connect it using MySQL Workbench but I'm able to access it through CLI. Workbench throws an error saying as if there wasn't a database to be connected.

docker run -d --net=cluster --name=mysql1 --ip=192.168.0.10 -e MYSQL_RANDOM_ROOT_PASSWORD=true -p 3306:3306 -p 33060:33060 mysql/mysql-cluster mysqld 

Besides trying to login with root I've also created a new user to try to login with the same outcome.

enter image description here

Rinaldi Segecin
  • 449
  • 8
  • 23
  • In your docker run command, the IP is : 192.168.0.10 Why do you try to connect to 192.168.99.100 ? – NRE Dec 18 '20 at 08:47
  • that's the ipaddress of the mysql server in the overlay network – Rinaldi Segecin Dec 18 '20 at 08:59
  • What's happen if you do a telnet: `telnet 192.168.99.100 3306` ? – NRE Dec 18 '20 at 09:08
  • @NRE take a look at overlay network in docker. 192.168.0.10 is the container ip address inside docker, outside docker you would access it through 192.168.99.100:3306. 192.168.0.10 is the ip so other containers in the same overlay network called "cluster" can reach it also this ip is configured here https://github.com/mysql/mysql-docker/blob/94336aa7575818405b1e5450e964183a5aad23e4/template/cnf/mysql-cluster.cnf#L39. – Rinaldi Segecin Dec 18 '20 at 09:53
  • Have you found a solution? – W.H Jul 02 '23 at 22:51
  • I've gave up trying to setup the mySQL cluster, this is the last that I've gone https://github.com/rsegecin/mysql-cluster I switched my project to mongodb that you can set it up a cluster for free in their site. – Rinaldi Segecin Jul 04 '23 at 09:03

0 Answers0