-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect to Azure Sql Database #30
Comments
Hi, please take a look at the I don't have an Azure account to test with, but your connection string looks like it has these issues:
It still seems that go-mssqldb is able to parse it, but maybe it's interpreting it as an ADO string, and missing the So I would try with: const db = sql.open('sqlserver', 'server=xxxxxxxx-a-sqls-001-trip.database.windows.net:1433;database=XXXXXXX-A-SQLD-001-TRIP-DIENSTREGELINGEN;user=trip-admin@xxxxxxxxx-a-sqls-001-trip;password=xxxxxxxxxxx;encrypt=false;TrustServerCertificate=true;hostNameInCertificate=*.database.windows.net;'); |
I got another error now ERRO[0005] GoError: lookup xxxxxxx-a-sqls-001-trip.database.windows.net:1433: no such host at least it is not a login failed without explanation why |
Found a way to connect
Seems I had to use ADO as you said but add tcp: in front of the host, maybe append the documentation that jdbc wouldn't work ? and you need to use the ADO format ? |
Great that you got it working. That's good to know. JDBC is specific to Java, so we shouldn't need to mention it. And go-mssqldb supports 3 ways of specifying the connection string, so ADO is not strictly required. I would assume that a URL would also work, but you'd have to URL encode it properly. |
I tried running a test vs an Azure Sql Database but I can't seem to connect to it while I'm sure the username and password are ok. I am perfectly able to connect with this connection string in my java application or SquirellSQL query tool.
Here is my test, I blanked out the domain and password in the connection string I can say however the password contains these characters: +$(%
I also url encoded the password in one of my attempts to get it fixed
output:
The text was updated successfully, but these errors were encountered: