我正在尝试在Tornado演示文件夹中执行博客演示,但我需要运行那个MySQL软件。
我安装了Python-Mysql的预编译版本,现在当我尝试执行blog.py时,我收到以下错误消息:
[E 111119 10:39:25 database:77] Cannot connect to MySQL on 127.0.0.1:3306
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\tornado\database.py", line 74, in __in
it__
self.reconnect()
File "C:\Python27\lib\site-packages\tornado\database.py", line 91, in reco
nnect
self._db = MySQLdb.connect(**self._db_args)
File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Conn
ect
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 '127.0.0.1' (1006
1)")
问题的原因在哪里?