>>> db=MySQLdb.connect(passwd="king123",db="thangs",host="localhost",port=3306,user="user")
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
db=MySQLdb.connect(passwd="king123",db="thangs",host="localhost",port=3061,user="user")
File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")
我在正确的端口上运行它,它仍然给我错误。任何人都可以给我任何想法吗