xo / usql

Universal command-line interface for SQL databases
MIT License
8.81k stars 346 forks source link

error: sqlserver: TLS Handshake failed: tls: server selected unsupported protocol version 301 #465

Closed CallmeprofessorDuan closed 1 month ago

CallmeprofessorDuan commented 1 month ago

Hi, I encountered an error when connecting to the SQL Server database as follows "error: sqlserver: TLS Handshake failed: tls: server selected unsupported protocol version 301" Is there any way to solve it?

kenshaw commented 1 month ago

Per this stackoverflow post you either need to uprade your SQL server connection, or disable encryption. Try adding a query string parameter ?encrypt=disable to the URL and try again.

Closing this ticket as done, please reopen if this doesn't work for you.