We are currently trying to fix a problem with the dotnet core and the EF core with AWS Aurora db (mysql) running on RDS.
We get "unknown database" errors in some of our samples through EF, the problem is that they are quite rare and the database obviously exists. I added the error below, unfortunately, I was able to find another question open 4 days ago ( AWS Aurora Server sometimes responds with "Unknown database: ..."; ), but there are no satisfactory answers to it.
I would be grateful for any help, or even for recognizing that it is not only me and the other guy.
fail: MySql.Data.EntityFrameworkCore.Query.Internal.MySQLQueryCompilationContextFactory[1]
An exception occurred in the database while iterating the results of a query.
MySql.Data.MySqlClient.MySqlException: Unknown database 'mydb_dev'
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadOk(Boolean read)
at MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String databaseName)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open()
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
MySql.Data.MySqlClient.MySqlException: Unknown database 'mydb_dev'
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadOk(Boolean read)
at MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String databaseName)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open()
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.MoveNext()
at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()