(20002, b'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (127.0.0.

使用python 3.7 

pymssql 连接本地mysql 5.6 报错

(20002, b'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (127.0.0.

 

 

解决:参考

https://www.cnblogs.com/springbrotherhpu/p/11503139.html

https://blog.****.net/llx1026/article/details/79579572

 

1.在https://sourceforge.net/projects/freetdswindows/ 下载 windows 的freetds

2. 解压,cmd 进入 F:\FreeTDS-1.00-x86\freetds-1.00\bin

3. 尝试连接 报错

(20002, b'DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (127.0.0.

 

 

问题是

Adaptive Server connection failed
OS error 10060, "Unknown error"

 

4. 解决

 我傻了。。。

pymssql 是对于 SQL SERVER的

而要用 mysql,使用 pymysql  。。。。。太愚蠢了

 

CONFIG = {
    "host": '127.0.0.1',
    "user": 'erio',
    "pwd": '123',
    'db': 'Library'
}


conn = pymysql.connect(CONFIG['host'], CONFIG['user'],CONFIG['pwd'])

这样连接成功。

上一篇:缺陷严重程度(Severity)


下一篇:Boost 复杂日志过滤