升级到dotnet 6后,使用MySQL Server进行身份验证失败

发布于 2025-02-13 19:09:11 字数 442 浏览 3 评论 0原文

我有一个用dotnet 5编写的MVC WebApp(C#)解决方案,该解决方案使用Nuget软件包mysql.data(8.0.29)和Dapper(2.0.123)访问MySQL数据库。一切都按预期工作。

我现在已经在Vs 2022中打开了解决方案,并将所有项目升级到dotnet 6。没有对代码或Nuget软件包进行更改。连接到MySQL数据库突然使用mySqlexception

使用方法为用户'XY'托管“ localhost”的身份验证 消息失败的'mysql_native_password'失败:用户拒绝访问 'xy'@'localhost'(使用密码:是)

如前所述,除了从dotnet 5切换到dotnet 6。切换到dotnet 5解决问题,解决了问题,一切都可以解决。

怪异的东西有多奇怪?有人有主意吗?

I have a MVC webapp (C#) solution written in DotNet 5 which accesses a MySql database using the nuget packages MySql.Data (8.0.29) and Dapper (2.0.123) as an ORM. Everything works as expected.

I now have opened the solution in VS 2022 and upgraded all projects to DotNet 6. No changes to code or nuget packages were made. Connecting to the MySql database suddenly fails with a MySqlException:

Authentication to host 'localhost' for user 'xy' using method
'mysql_native_password' failed with message: Access denied for user
'xy'@'localhost' (using password: YES)

As mentioned before no changes were made to the solution except switching from DotNet 5 to DotNet 6. Switching back to DotNet 5 solves the problem and everything is working again.

How weird can weird get? Anybody have an idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文