简体   繁体   English

使用方法“mysql_native_password”对用户“用户名”的主机“192.168.0.31”进行身份验证失败,并显示消息:未知数据库“mysql57”

[英]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 database actually exists数据库实际存在

You can download source project Here .您可以在此处下载源项目。

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.

相关问题 使用方法“mysql_native_password”对用户“root”的主机“127.0.0.1”进行身份验证失败,并显示消息:未知数据库“xxx” - Authentication to host '127.0.0.1' for user 'root' using method 'mysql_native_password' failed with message: Unknown database 'xxx' 使用方法“ mysql_native_password”对主机或用户进行身份验证失败 - authentication to host or user using method 'mysql_native_password' failed 使用方法 'mysql_native_password' 对用户 'root' 的主机 'localhost' 进行身份验证失败并显示消息(使用密码:否) - Authentication to host 'localhost' for user 'root' using method 'mysql_native_password' failed with message (using password: NO) 如何修复“使用方法 'mysql_native_password' 为用户进行身份验证失败并显示消息:从流中读取失败。” 在.NET中 - How to fix 'Authentication to host for user using method 'mysql_native_password' failed with message: Reading from the stream has failed.' in .NET 使用方法 mysql_native_password 验证失败 - Authentication failed using method mysql_native_password 使用方法“ mysql_native_password”失败 - using method 'mysql_native_password' failed 方法'mysql_native_password'失败并显示消息:用户''@'RAHUL-PC'的访问被拒绝(使用密码:是) - method 'mysql_native_password' failed with message: Access denied for user ''@'RAHUL-PC' (using password: YES) C# - 意外的身份验证方法 mysql_native_password 异常 - C# - Unexpected authentication method mysql_native_password exception 从流读取失败 - mysql_native_password错误 - Reading from stream failed - mysql_native_password error 将用户输入的用户名/密码与mysql数据库的用户名/密码进行比较 - Comparing user input username/password to mysql database username/password not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM