Authentication to host ‘ ‘ for user ‘root‘ using method ‘caching_sha2_password‘ failed
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host ‘127.0.0.1’ for user ‘root’ using method ‘caching_sha2_password’ failed with message: Access denied for user ‘root’@‘localhos
·
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host ‘127.0.0.1’ for user ‘root’ using method ‘caching_sha2_password’ failed with message: Access denied for user ‘root’@‘localhost’ (using password: YES)
—> MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user ‘root’@‘localhost’ (using password: YES)
情况描述:在开启了外网时后布署程序。程序里设置的host 127.0.0.1时报的错。但可以用工具远程连接数据库,并且直接用mysql命令行登陆操作也不影响。
这些其实都不用管。就是密码错了。遇到这问题是因为配置文件有几个。我以为会读正式的配置文件。没想到读的是另一个配置文件。那个文件上面的密码并没有更改。所以就这样了。
更多推荐
已为社区贡献1条内容
所有评论(0)