当前位置:   article > 正文

“An exception has been raised that is likely due to a transient failure. Consider enabling transient

an exception has been raised that is likely due to a transient failure. cons

本文由 比特飞 原创发布,欢迎大家踊跃转载。

转载请注明本文地址:“An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding ‘EnableRetryOnFailure()’ to the ‘UseMySql’ call.”的解决方案 | .Net中文网

描述

使用 EFCore 去连接 mysql 数据库的时候,提示下面的报错信息:

An exception has been raised that is likely due to a transient failure.

Consider enabling transient error resiliency by

adding ‘EnableRetryOnFailure()’ to the ‘UseMySql’ call.

解决

在连接字符串中加入 sslMode=None 就可以了,代码如下:

Server=localhost;

port=3306;

Database=yourDatabase;

Uid=yourUserId;

Pwd=yourPassword;

Allow User Variables=True;

sslMode=None;

本文由 比特飞 原创发布,欢迎大家踊跃转载。

转载请注明本文地址:“An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding ‘EnableRetryOnFailure()’ to the ‘UseMySql’ call.”的解决方案 | .Net中文网

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/891842
推荐阅读
相关标签
  

闽ICP备14008679号