我的rp和我的电脑连接到同一个lan(wifi)
import pymysql
import MySQLdb
import time
import datetime
import Adafruit_DHT as dht
db = pymysql.connect("192.168.137.","root","","H_S")
cursor=db.cursor()
我收到这个消息了
Traceback (most recent call last):
File "adc.py", line 17, in <module>
db = pymysql.connect("198.168.137.1","root","","hop_S")
File "/usr/local/lib/python2.7/dist-packages/pymysql/__init__.py", line 94, in Connect
return Connection(*args,**kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 327, in __init__
self.connect()
File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 629, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '192.168.137.1' (timed out)")
我的电脑中的防火墙被禁用,所有东西都配置为接受外部连接
暂无答案!
目前还没有任何答案,快来回答吧!