首页 新闻 会员 周边

关于使用 dotnet ef 迁移到 docker mysql 容器的疑问

0
悬赏园豆:10 [已解决问题] 解决于 2020-03-27 13:55
  • 已检查过连接字符串没有错误,使用 HeidiSQL 也可以链接到 docker 的 mysql 容器
  • 迁移到 Win Server 下的 mysql 没有任何问题
  • 使用 Sqlsugar 能访问到 docker 的 mysql 容器

错误信息

  • PS E:\jincai.qiu\dev\repos\ConsoleApp1\ConsoleApp1> dotnet ef database update
    Build started...
    Build succeeded.
    The EF Core tools version '3.1.0' is older than that of the runtime '3.1.3'. Update the tools for the latest features an
    d bug fixes.
    An error occurred using the connection to database '' on server '192.168.255.100'.
    System.InvalidOperationException: An exception has been raised that is likely due to a transient failure. Consider enabl
    ing transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseMySql' call.
    ---> MySql.Data.MySqlClient.MySqlException (0x80004005): SSL Authentication Error
    ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
    ---> System.ComponentModel.Win32Exception (0x80090302): 要求的函数不受支持
    --- End of inner exception stack trace ---
jessqiu的主页 jessqiu | 初学一级 | 园豆:195
提问于:2020-03-27 11:53
< >
分享
最佳答案
0

我在 my.cnf 的 mysqld 加上了 skip_ssl 就可以迁移成功

jessqiu | 初学一级 |园豆:195 | 2020-03-27 13:39

或者在连接字符串 加上;sslMode=None就可了

jessqiu | 园豆:195 (初学一级) | 2020-03-27 13:54
其他回答(1)
0

试试安装一下最新版 .net core sdk

收获园豆:10
dudu | 园豆:30994 (高人七级) | 2020-03-27 12:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册