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?