我有一个问题,我正在制作一个连接到数据库的应用程序,我一直在使用免费托管,我从来没有遇到过连接到数据库的问题,几天前我做了一个谷歌云帐户,并制作了一个数据库,结果发现现在它只在我连接到我的WiFi时才连接.我猜这与我的IP有关,但我有点迷路了,我是一个新手,当我尝试登录时,我得到以下错误:
04-01 13:04:20.634 5095 5123 I python : Traceback (most recent call last):
04-01 13:04:20.635 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/network.py", line 600, in open_connection
04-01 13:04:20.636 5095 5123 I python : TimeoutError: [Errno 110] Connection timed out
04-01 13:04:20.636 5095 5123 I python :
04-01 13:04:20.637 5095 5123 I python : The above exception was the direct cause of the following exception:
04-01 13:04:20.637 5095 5123 I python :
04-01 13:04:20.637 5095 5123 I python : Traceback (most recent call last):
04-01 13:04:20.637 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/app/main.py", line 1663, in <module>
04-01 13:04:20.638 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/app.py", line 955, in run
04-01 13:04:20.639 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/app.py", line 925, in _run_prepare
04-01 13:04:20.639 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/app/main.py", line 1659, in build
04-01 13:04:20.640 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 305, in load_file
04-01 13:04:20.640 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 407, in load_string
04-01 13:04:20.641 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 660, in _apply_rule
04-01 13:04:20.641 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/uix/widget.py", line 470, in apply_class_lang_rules
04-01 13:04:20.642 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 540, in apply
04-01 13:04:20.642 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 662, in _apply_rule
04-01 13:04:20.643 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 662, in _apply_rule
04-01 13:04:20.643 5095 5123 I python : [Previous line repeated 3 more times]
04-01 13:04:20.643 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/kivy/lang/builder.py", line 658, in _apply_rule
04-01 13:04:20.644 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/app/main.py", line 939, in __init__
04-01 13:04:20.644 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/app/base_datos.py", line 118, in leer_tabla_pedido
04-01 13:04:20.645 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/pooling.py", line 294, in connect
04-01 13:04:20.645 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/connection.py", line 167, in __init__
04-01 13:04:20.646 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/abstracts.py", line 1178, in connect
04-01 13:04:20.646 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/connection.py", line 571, in _open_connection
04-01 13:04:20.647 5095 5123 I python : File "/mnt/c/pakagin_1.0/.buildozer/android/platform/build-arm64-v8a/build/python-installs/pkgapp/arm64-v8a/mysql/connector/network.py", line 602, in open_connection
04-01 13:04:20.647 5095 5123 I python : mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '35.202.36.237:3306' (110 Connection timed out)
04-01 13:04:20.647 5095 5123 I python : Python for android ended.
我用的是mysql workbench 8.0.32
1条答案
按热度按时间wpx232ag1#
您可以尝试以下步骤来解决此问题:
1.检查MySQL服务器是否配置为接受来自您的IP地址的连接
1.检查防火墙是否阻止了连接
1.检查是否有任何网络问题
如果您仍然面临问题,请提供有关您的设置的更多详细信息,以及到目前为止您为解决此问题所采取的步骤。