噗嗤。操作错误: ('08001', '[08001] [Microsoft][SQL Server 的 ODBC 驱动程序 18]SSL 提供程序: [错误:1416F086:SSL 例程:t



我得到以下错误。有人能帮我解决这个问题吗?

driver:ODBC Driver 18 for SQL Server
DRIVER=ODBC Driver 18 for SQL Server;SERVER=ACE2T21978SQ001.az.3pc.att.com;DATABASE=QE2S_LASA01;UID=ITSERVICESm53132;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 VM使用Windows集成身份验证连接到SQL Server/MS Active Directory身份验证

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