pyodbc.OperationalError:('08001 ','[08001] [Microsoft][用于SQL Server的ODBC驱动程序18]SSL提供程序:[错误:1416F086:SSL例程:tls进程服务器ce

2sbarzqh  于 2022-12-22  发布在  SQL Server
关注(0)|答案(1)|浏览(1138)

我得到下面的错误。有人能帮我修复吗?

driver:ODBC Driver 18 for SQL Server
DRIVER=ODBC Driver 18 for SQL Server;SERVER=ACE2T21978SQ001.az.3pc.att.com;DATABASE=QE2S_LASA01;UID=ITSERVICES\m53132;PWD=Dallastexas+6;Trusted_Connection=yes;TrustedServerCertificate=yes;Encrypt=yes;
Traceback (most recent call last):
  File "python_table_import.py", line 50, in <module>
    cnxn = pyodbc.connect(con_string)
pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:subject name does not match host name] (-1) (SQLDriverConnect)')

尝试使用Python从Linux虚拟机通过Windows集成身份验证/MS Active Directory身份验证连接到SQL Server

eufgjt7s

eufgjt7s1#

正确的连接字符串属性是TrustServerCertificate=yes,而不是TrustedServerCertificate=yes

相关问题