Home > Enterprise >  Authentication to host '192.168.0.31' for user 'username' using method 'mys
Authentication to host '192.168.0.31' for user 'username' using method 'mys

Time:08-14

Here is the error message:

Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host '192.168.0.31' for user 'username' using method 'mysql_native_password' failed with message: Unknown database 'mysql57'
 ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown database 'mysql57'
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
   at MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset)
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.Driver.Open()
   at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()

I already tested numerous solutions but none of them worked.

The database actually exists

You can download source project Here.

CodePudding user response:

The name of database is wrong. Check whether it is another name or case.

CodePudding user response:

So I tried to fix the error myself but there is another one

 Authentication to host 'localhost' for user 'root' using method 'caching_sha2_password' failed with message: Unknown database 'mysql80'
  • Related