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

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

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

  1. br-01be9e40dd7a: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
  2. inet 172.21.0.1 netmask 255.255.0.0 broadcast 172.21.255.255
  3. ether 02:42:94:30:cb:7a txqueuelen 0 (Ethernet)
  4. RX packets 0 bytes 0 (0.0 B)
  5. RX errors 0 dropped 0 overruns 0 frame 0
  6. TX packets 0 bytes 0 (0.0 B)
  7. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  8. br-ba93c3c2bef0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
  9. inet 172.19.0.1 netmask 255.255.0.0 broadcast 172.19.255.255
  10. ether 02:42:98:18:12:e6 txqueuelen 0 (Ethernet)
  11. RX packets 0 bytes 0 (0.0 B)
  12. RX errors 0 dropped 0 overruns 0 frame 0
  13. TX packets 0 bytes 0 (0.0 B)
  14. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  15. br-eb45e499b6fe: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  16. inet 172.18.0.1 netmask 255.255.0.0 broadcast 172.18.255.255
  17. inet6 fe80::42:e5ff:fea6:1945 prefixlen 64 scopeid 0x20<link>
  18. ether 02:42:e5:a6:19:45 txqueuelen 0 (Ethernet)
  19. RX packets 1001 bytes 7401024 (7.4 MB)
  20. RX errors 0 dropped 0 overruns 0 frame 0
  21. TX packets 1619 bytes 2773118 (2.7 MB)
  22. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  23. docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
  24. inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
  25. ether 02:42:0c:93:47:03 txqueuelen 0 (Ethernet)
  26. RX packets 0 bytes 0 (0.0 B)
  27. RX errors 0 dropped 0 overruns 0 frame 0
  28. TX packets 0 bytes 0 (0.0 B)
  29. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  30. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  31. inet 127.0.0.1 netmask 255.0.0.0
  32. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  33. loop txqueuelen 1000 (Local Loopback)
  34. RX packets 14469 bytes 9011072 (9.0 MB)
  35. RX errors 0 dropped 0 overruns 0 frame 0
  36. TX packets 14469 bytes 9011072 (9.0 MB)
  37. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  38. veth3289980: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  39. inet6 fe80::c0c8:a4ff:fea7:bf3 prefixlen 64 scopeid 0x20<link>
  40. ether c2:c8:a4:a7:0b:f3 txqueuelen 0 (Ethernet)
  41. RX packets 34117 bytes 5768655 (5.7 MB)
  42. RX errors 0 dropped 0 overruns 0 frame 0
  43. TX packets 30803 bytes 43343130 (43.3 MB)
  44. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  45. veth1308d56: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  46. inet6 fe80::445c:caff:fef5:3562 prefixlen 64 scopeid 0x20<link>
  47. ether 46:5c:ca:f5:35:62 txqueuelen 0 (Ethernet)
  48. RX packets 30353 bytes 41061075 (41.0 MB)
  49. RX errors 0 dropped 0 overruns 0 frame 0
  50. TX packets 34883 bytes 5901160 (5.9 MB)
  51. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  52. veth2f4431e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  53. inet6 fe80::a85c:3bff:fe99:a58c prefixlen 64 scopeid 0x20<link>
  54. ether aa:5c:3b:99:a5:8c txqueuelen 0 (Ethernet)
  55. RX packets 67 bytes 356774 (356.7 KB)
  56. RX errors 0 dropped 0 overruns 0 frame 0
  57. TX packets 594 bytes 117051 (117.0 KB)
  58. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  59. veth563d700: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  60. inet6 fe80::602a:a8ff:fe8f:6e17 prefixlen 64 scopeid 0x20<link>
  61. ether 62:2a:a8:8f:6e:17 txqueuelen 0 (Ethernet)
  62. RX packets 679 bytes 7085899 (7.0 MB)
  63. RX errors 0 dropped 0 overruns 0 frame 0
  64. TX packets 1243 bytes 666010 (666.0 KB)
  65. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  66. vethd7b8d83: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  67. inet6 fe80::b423:8fff:fe08:a4f5 prefixlen 64 scopeid 0x20<link>
  68. ether b6:23:8f:08:a4:f5 txqueuelen 0 (Ethernet)
  69. RX packets 1135 bytes 540674 (540.6 KB)
  70. RX errors 0 dropped 0 overruns 0 frame 0
  71. TX packets 1528 bytes 533539 (533.5 KB)
  72. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  73. virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
  74. inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
  75. ether 52:54:00:4e:5a:e9 txqueuelen 1000 (Ethernet)
  76. RX packets 0 bytes 0 (0.0 B)
  77. RX errors 0 dropped 0 overruns 0 frame 0
  78. TX packets 0 bytes 0 (0.0 B)
  79. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  80. wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  81. inet 10.181.65.137 netmask 255.255.255.0 broadcast 10.181.65.255
  82. inet6 fe80::f9ef:4721:26fc:1b51 prefixlen 64 scopeid 0x20<link>
  83. ether 9c:b6:d0:94:e5:b1 txqueuelen 1000 (Ethernet)
  84. RX packets 208036 bytes 188580267 (188.5 MB)
  85. RX errors 0 dropped 0 overruns 0 frame 0
  86. TX packets 119516 bytes 35672827 (35.6 MB)
  87. 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?

暂无答案!

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

相关问题