I am using the statement below to try and open a connection to the latest download of SQLServer Express.
import (
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/mssql"
"log"
)
db, err := gorm.Open("mssql", "sqlserver://tony:Password6!@localhost:1433?database=go_user")
The statement results in an error:
2019/09/30 10:29:16 Unable to open tcp connection with host 'localhost:1433': dial tcp [::1]:1433: connectex: No connection could be made because the target machine actively refused it. panic: Unable to open tcp connection with host 'localhost:1433': dial tcp [::1]:1433: connectex: No connection could be made because the target machine actively refused it.
Is anyone successfully connecting to SQLServer Express with GORM on Golang?