升级到dotnet 6后,使用MySQL Server进行身份验证失败
我有一个用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论