Skip to content

invalid port number MSSQL #319

Answered by wangxiaoying
SergKS8 asked this question in Q&A
Jul 28, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @SergKS8 , in case of the special symbols, you can use urlencoding to encode your password in connection string. Here is an example:

import urllib.parse
f"mssql://{username}:{urllib.parse.quote_plus(password)}@{host}:{port}/{database}"

As for the port, can you try to explicitly specify your port in the connection string?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@SergKS8
Comment options

@evbo
Comment options

@ggurjar333
Comment options

Answer selected by wangxiaoying
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants