$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3032464e8fd9 magento/magento2devbox-web:latest "/usr/local/bin/en..." About an hour ago Up 54 minutes 5000/tcp, 9000/tcp, 44100/tcp, 0.0.0.0:32770->22/tcp, 0.0.0.0:32769->80/tcp magento2devbox_web_7299181703f96e251f8ade2bbb8a1763
835e5e466881 mysql:5.6 "docker-entrypoint..." About an hour ago Up 54 minutes 0.0.0.0:32768->3306/tcp magento2devbox_db_7299181703f96e251f8ade2bbb8a1763
Under the mysql:5.6 image, you see 0.0.0.0:32768->3306/tcp.
This means that you can use a MySQL client like Sequel Pro or MySQL Workbench to connect:
Host: 127.0.0.1
Username: root
Password: root
Port: 32768
I'm not sure if the port is constant.
But you can always check with docker ps
. In the guide you linked, it looks like there are instructions to set up a static port so that connecting with PHPStorm is less burdensome. I assume this process generalizes to the MySQL container.
The default username:password is root:root.
You can confirm this:
[local]$ docker exec --user=magento2 -it magento2devbox_web_12345678 /bin/bash
[magento2]$ cd magento2
[magento2]$ cat app/etc/env.php
Inside you will see the database connection credentials.