为什么我不能用dbforge for mysql连接到mysql?

mwg9r5ms  于 2021-06-15  发布在  Mysql
关注(0)|答案(0)|浏览(284)

我的ubuntu pc上的localhost端口3306上有一个docker容器在运行mysql。localhost:8081 opens phpmyadmin公司。我正在本地(无线)网络上的Windows10 pc上运行dbforge for mysql。我正在尝试从运行在windows10中的dbforge连接到运行在docker下的ubuntu上的mysql。我在ubuntu pc上运行了ifconfig,得到的结果如下:
块引用

br-01be9e40dd7a: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.21.0.1  netmask 255.255.0.0  broadcast 172.21.255.255
        ether 02:42:94:30:cb:7a  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-ba93c3c2bef0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.19.0.1  netmask 255.255.0.0  broadcast 172.19.255.255
        ether 02:42:98:18:12:e6  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-eb45e499b6fe: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:e5ff:fea6:1945  prefixlen 64  scopeid 0x20<link>
        ether 02:42:e5:a6:19:45  txqueuelen 0  (Ethernet)
        RX packets 1001  bytes 7401024 (7.4 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1619  bytes 2773118 (2.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:0c:93:47:03  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 14469  bytes 9011072 (9.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14469  bytes 9011072 (9.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth3289980: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::c0c8:a4ff:fea7:bf3  prefixlen 64  scopeid 0x20<link>
        ether c2:c8:a4:a7:0b:f3  txqueuelen 0  (Ethernet)
        RX packets 34117  bytes 5768655 (5.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30803  bytes 43343130 (43.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth1308d56: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::445c:caff:fef5:3562  prefixlen 64  scopeid 0x20<link>
        ether 46:5c:ca:f5:35:62  txqueuelen 0  (Ethernet)
        RX packets 30353  bytes 41061075 (41.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34883  bytes 5901160 (5.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth2f4431e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a85c:3bff:fe99:a58c  prefixlen 64  scopeid 0x20<link>
        ether aa:5c:3b:99:a5:8c  txqueuelen 0  (Ethernet)
        RX packets 67  bytes 356774 (356.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 594  bytes 117051 (117.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth563d700: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::602a:a8ff:fe8f:6e17  prefixlen 64  scopeid 0x20<link>
        ether 62:2a:a8:8f:6e:17  txqueuelen 0  (Ethernet)
        RX packets 679  bytes 7085899 (7.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1243  bytes 666010 (666.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethd7b8d83: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::b423:8fff:fe08:a4f5  prefixlen 64  scopeid 0x20<link>
        ether b6:23:8f:08:a4:f5  txqueuelen 0  (Ethernet)
        RX packets 1135  bytes 540674 (540.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1528  bytes 533539 (533.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:4e:5a:e9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.181.65.137  netmask 255.255.255.0  broadcast 10.181.65.255
        inet6 fe80::f9ef:4721:26fc:1b51  prefixlen 64  scopeid 0x20<link>
        ether 9c:b6:d0:94:e5:b1  txqueuelen 1000  (Ethernet)
        RX packets 208036  bytes 188580267 (188.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 119516  bytes 35672827 (35.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

块引用
dbforge connection菜单上的“test connection”失败,出现10061错误。我尝试了172.17.0.1到172.21.0.1的所有IP。
在下一次尝试中,我试着建立一条ngrok隧道localhost:3306. 这也失败了。以下是ngrok的转发:转发http://subst-mysql.ngrok.io -> http://localhost:3306
我已经尝试将dbforge中的tcp字段设置为subst-mysql.ngrok.io,并将端口设置为3306。这也失败了。
以下是docker容器的定义:
块引用
mysql:container\u name:“mysql”重启:除非停止映像:mysql:5.7 command:mysqld--character set server=utf8mb4--collation server=utf8mb4\u bin--sql\u mode=''--general log=1环境:-mysql\u数据库-mysql\u密码-mysql\u根密码-mysql\u用户卷:-data:/var/lib/mysql-./mysql/mysql.sql:/docker-entrypoint-initdb.d/mysql.sql端口:-“3306:3306”网络:-net
块引用
如何从dbforge和windows10 pc连接到运行在docker下的ubuntumysql?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题