在SQL server参数增加:
encrypt=false;trustServerCertificate=true;
注意有的文章只建议增加trustServerCertificate。但是有些连接器(flink jdbc)会默认添加encrypt=true参数。造成连接失败。
If TrustServerCertificate is set to true and encryption is turned on, the encryption level specified on the server will be used even if Encrypt is set to false. The connection will fail otherwise.
解决SQLserver连接失败:encrypt=false与trustServerCertificate=true的冲突
在配置SQLserver连接时,若trustServerCertificate设为true且加密启用,即使encrypt设为false,也会使用服务器指定的加密级别。当此设置不匹配时,连接可能会失败。特别地,某些如FlinkJDBC的连接器会默认设置encrypt为true,导致问题发生。
639

被折叠的 条评论
为什么被折叠?



