go-mssqldb: sql server 2005 encryption fails
This just seemed to have started in the pass few days.
I’m connecting to a remote SQL Server (2005) - I have no ability to update (not my db).
// DBConnection connection to the MS SQL database type DBConnection struct { ConnectionStr string DB *sqlx.DB }
func (d *DBConnection) ConnectDatabase() { // connect to SQL Server var err error fmt.Println(d.ConnectionStr) // open the database d.DB, err = sqlx.Open(“mssql”, d.ConnectionStr) ErrorCheck(err, “Open connection failed”, true)
fmt.Println("Pinging...")
// Make sure that the database is available
err = d.DB.Ping() <=== Error occurs here at Ping
ErrorCheck(err, "Cannot connect", true)
}
Error: Login error: EOF
The only difference on my end is that I’ve upgraded to GO 1.5 from 1.4.2
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 16
Commits related to this issue
- Merge pull request #121 from wmetaw/master Add NewDB to spanner.go — committed to orijtech/go-mssqldb by dhui 6 years ago
Edit: I see that scohen28 did mention go version, perhaps an entry in the readme will help others.
This may also apply when upgrading to go1.5. Error: Cannot connect: Login error: EOF
Appending “encrypt=disable;” to the connection string does allow the connection.