简体   繁体   中英

How to connection Mysql cluster

I tried to instal mysql cluster.

https://hub.docker.com/r/mysql/mysql-cluster/[enter link description here] 1

在此处输入图像描述 It seems to have been installed and even connected, but I don't know how to connect with MySQL Workbench or Dbeaver.

In your docker run command, you can use -p 3306:3306 (or any available port). Then you can use <host>:<port> from Workbench or Dbeaver connection URL.

I assume that you already know how to add new DB connection to MySQL Workbench or DBeaver . The information that you want is the connection URL and the username/password of an authenticated user that you need to use to connect to your MySQL cluster.

For the connection URL : 192.168.0.10 (no port in your example)

You need to have your MySQL Workbench or DBeaver connect to the URL of the MySQL node , which is mysql1 node in your example. As shown in your screen capture, it is 192.168.0.10 without any explicit port. But if you have troubles with the URL, you can run docker ps to check what host and port that your mysql1 is running and exposed at.

For the username/password : root/tpffnrtm1 (the password is the value of MYSQL_ROOT_PASSWORD as shown in your docker run of MySQL node command)

I assume that you just want to connect the DB cluster by any means (root or non-root privileges is totally fine for you).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM