I receive this error since this morning, new v12 updated server / Azure SQL Database:
TLS Handshake failed: x509: certificate is valid for tr12.nort
Based on this closed issue I changed TrustServerCertificate
from False
to True
and added this parameter hostNameInCertificate
to the connection string and it is working now:
https://github.com/denisenkom/go-mssqldb/issues/55
TrustServerCertificate=True;hostNameInCertificate=*.database.windows.net;
Azure portal suggests to have TrustServerCertificate=False
and no hostNameInCertificate
.