We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Cannot connect to named MSSQL server running locally.
> unable to open tcp connection with host 'localhost:1443': dial tcp 127.0.0.1:1443: connect: connection refused
EDIT This seems to only occur when trying to connect to my SQL Server instance running on Windows, from a go app running in WSL.
To Reproduce
I've tried various connection string formats:
str1 := "server=localhost,mssqlserver2022;port=61821;user id=sa;password=sa;database=FooDB" str2 := "server=localhost,mssqlserver2022;port=1433;user id=sa;password=sa;database=FooDB" str3 := "server=localhost/mssqlserver2022;user id=sa;password=sa;database=FooDB" str4 := "server=localhost;user id=sa;password=sa;database=FooDB" str5 := "server=localhost:1433;user id=sa;password=sa;database=FooDB" str6 := "server=localhost\\mssqlserver2022:1433;user id=sa;password=sa;database=FooDB" str7 := `server=localhost\mssqlserver2022:1433;user id=sa;password=sa;database=FooDB` // try with sqlserver connection, err := sql.Open("sqlserver", str) // try with mssql connection, err := sql.Open("mssql", str)
I have a C# app on the side which uses this connection string, and it succeeds:
await using var connection = new SqlConnection( """ persist security info=false; server=localhost\mssqlserver2022; initial catalog=FooDB; user id=sa; password=sa; """);
I've tried import _ "github.com/microsoft/go-mssqldb" and import _ "github.com/denisenkom/go-mssqldb"
import _ "github.com/microsoft/go-mssqldb"
import _ "github.com/denisenkom/go-mssqldb"
Expected behavior
It should connect
SQL Server v. 16.0.1105.1 Windows 10 Home
The text was updated successfully, but these errors were encountered:
I have the same issue
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Cannot connect to named MSSQL server running locally.
EDIT
This seems to only occur when trying to connect to my SQL Server instance running on Windows, from a go app running in WSL.
To Reproduce
I've tried various connection string formats:
I have a C# app on the side which uses this connection string, and it succeeds:
I've tried
import _ "github.com/microsoft/go-mssqldb"
andimport _ "github.com/denisenkom/go-mssqldb"
Expected behavior
It should connect
Further technical details
SQL Server v. 16.0.1105.1
Windows 10 Home
The text was updated successfully, but these errors were encountered: