Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

DOMAIN\user SQL Server login works with pyodbc/FreeTDS but fails with mssql_python

Đang mở
#625 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@sumitmsft đang làm issue này rồi.

Từ ngày 5/6/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

area: connectivity-auth inADO question triage done

I am using mssql_python against an on-prem SQL Server using a domain-style username DOMAIN\username but with a password.

The same server, database, username and password work when using pyodbc with the FreeTDS ODBC driver, but fail with mssql_python. The error message is

mssql_python.exceptions.OperationalError: Driver Error: Invalid authorization specification; DDBC Error: [Microsoft][SQL Server]Login failed for user 'DOMAIN\username'.
To reproduce

This code below works:

import pyodbc
s=r"DRIVER=FreeTDS;SERVER=servername;PORT=1433;DATABASE=DM_Database;UID=DOMAIN\username;PWD=J...;TDS_Version=7.4;Encrypt=yes"
conn = pyodbc.connect(_s)

This code below fails with the message reported above:

import mysql_python
s = r"SERVER=servername,1433;Database=DM_Database;UID=DOMAIN\username;PWD=J...;Encrypt=yes;
conn = mssql_python.connect(s)
Further technical details

Python version: 3.10.12
mssql_python: 1.8.0
SQL Server version: SQL Server 2022 (Must be verified, but this is what my documentation says)
Operating system: Ubuntu 22.04.5 LTS

Ngôn ngữ chính
Python
Star
478
Fork
62
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
27

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/mssql-python

Tất cả issue của microsoft/mssql-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.