MySQL Connector/NET SSL/TLS error: The handshake failed due to an unexpected packet format.

(Doc ID 2171549.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Connectors - Version 6.9 and later
Information in this document applies to any platform.

Goal

Why do I get this error message when trying to use TLSv1.1 or TLSv1.2 with Connector/NET on Windows?

Unhandled Exception: System.IO.IOException: The handshake failed due to an unexpected packet format.
  at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
  at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms