我得到下面的错误。有人能帮我修复吗?
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
1条答案
按热度按时间eufgjt7s1#
正确的连接字符串属性是
TrustServerCertificate=yes
,而不是TrustedServerCertificate=yes