0

本地连接数据库没问题, 在 AWS 服务器上连接数据库时,报数据库连接错误: 20009

环境是 python3.5 用的是 pymssql 连接的 MS SQLServer

Traceback (most recent call last):
  File "pymssql.pyx", line 635, in pymssql.connect (pymssql.c:10734)
  File "_mssql.pyx", line 1902, in _mssql.connect (_mssql.c:21821)
  File "_mssql.pyx", line 637, in _mssql.MSSQLConnection.__init__ (_mssql.c:6581)
  File "_mssql.pyx", line 1630, in _mssql.maybe_raise_MSSQLDatabaseException (_mssql.c:17524)
_mssql.MSSQLDatabaseException: (20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (db.alphainsight.ai:1433)\nNet-Lib error during Connection timed out (110)\n')

  File "pymssql.pyx", line 641, in pymssql.connect (pymssql.c:10824)
pymssql.OperationalError: (20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (db.alphainsight.ai:1433)\nNet-Lib error during Connection timed out (110)\n')

1 个回答

0

已采纳

谢谢 @Yujiaao 的提醒,已经解决了。是同事把端口调整了。