我的RP和我的电脑连接到同一局域网(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)")
我的电脑中的防火墙被禁用 并且所有东西都配置为接受外部连接