[英]Authentication to host '192.168.0.31' for user 'username' using method 'mysql_native_password' failed with message: Unknown database 'mysql57'
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 name of database is wrong.数据库名称错误。 Check whether it is another name or case.检查它是否是另一个名称或大小写。
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'
Your screenshot does not show that a database named mysql57
actually exists.您的屏幕截图并未显示名为mysql57
的数据库实际上存在。 The error message is correct: the database name you're trying to use is wrong.错误消息是正确的:您尝试使用的数据库名称是错误的。
Try changing to Database = brawldatabase;
尝试更改为Database = brawldatabase;
in your connection string.在您的连接字符串中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.