Could not establish a secure SQL Server connection using SSL encryption
Published 16 March 2022
Problem:
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.
Cause:
Due to updates to the Microsoft JDBC SQL Driver, connections are now set to be encrypted by default; this will break existing stored SQL Server connections if they rely on encryption being off (the previous default).
Solutions:
Either one of the following actions can remedy this:
In Flyway Desktop, edit the connection details in the blue settings cog in the top right of an opened project and check trust the server certificate.
OR
Edit the URL property in the settings file to append either ;encrypt=false or ;trustServerCertificate=true, taking into account that this potentially affects the security of your database connections.