我正在尝试运行这个程序
conn = pymssql.connect(host='localhost', user='notsa', password='notsayly', database='TallicaTweets')
但我收到以下错误:
Traceback (most recent call last):
File "harvester_of_tweets.py", line 11, in <module>
conn = pymssql.connect(host='localhost', user='username', password='password!', database='Database')
File "/usr/local/lib/python2.7/dist-packages/pymssql.py", line 607, in connect
raise OperationalError, e[0]
pymssql.OperationalError: DB-Lib error message 20009, severity 9:
Unable to connect: Adaptive Server is unavailable or does not exist
Net-Lib error during Connection refused Error 111 - Connection refused
搜索 Google 并没有真正的帮助,而且那里的一些 tuts 也不是很彻底。我应该将我的凭据添加到特定的配置文件中吗?以及如何在 mssql 中创建凭据?(我在psql中做过这些事情,但对mssql不熟悉。
我使用的是 Ubuntu 13.04,我的 python 版本是 2.7。
创建用户登录后,我收到此错误:
Traceback (most recent call last):
File "harvester_of_tweets.py", line 11, in <module>
conn = pymssql.connect(host='localhost', user='tweet', password='1234', database='tweet_db')
File "/usr/local/lib/python2.7/dist-packages/pymssql.py", line 607, in connect
raise OperationalError, e[0]
pymssql.OperationalError: DB-Lib error message 20009, severity 9:
Unable to connect: Adaptive Server is unavailable or does not exist
Net-Lib error during Connection refused Error 111 - Connection refused