简体   繁体   中英

can't connect to Azure SQL using SQLAlchemy with pymssql

Using SQLAlchemy to connect to SQL Server on Azure. I can access it via JDBC using SQL Workbench/J from same IP.(opened the IP in Azure)

Using the string:

mssql+pymssql://username:password@SQLservername.database.windows.net

Getting:

(pymssql.OperationalError) (20002, b'DB-Lib error message 20002, severity 9:\\nAdaptive Server connection failed (nibisql1.database.windows.net:1433)\\n') (Background on this error at: http://sqlalche.me/e/e3q8 )

I tried all variations, but none of them work.

  1. any idea why?

  2. How do I pass parameters such as databasename?

尝试改变

    mssql+pymssql://username@SQLservername:password@SQLservername.database.windows.net

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM