当前位置:   article > 正文

解决远程连接阿里云数据库更新表结构报错_an exception has been raised that is likely due to

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.

背景

最近在使用EFCore去连接阿里云上面的数据库进行更新表结构的时候,总是提示下面的报错信息,报错信息如下:
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就可以了,代码如下:

"Default":'Server=127.0.0.1;port=3306;Database=数据库;Uid=账户;Pwd=密码;CharSet=utf8;Allow User Variables=True;sslMode=None;';
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/891847
推荐阅读
相关标签
  

闽ICP备14008679号