从流读取失败-mysql_native_password错误 [英] Reading from stream failed - mysql_native_password error

查看:1257
本文介绍了从流读取失败-mysql_native_password错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我断断续续地遇到以下错误.

I have been facing the following error intermittently.

使用方法'mysql_native_password'对用户'root'的主机'127.0.0.1'进行身份验证失败,并显示以下消息:从流读取失败.

任何时候它都会飞起来,我无能为力.我还发布了一个有关MySQL错误的错误,并且事实证明解决方案没有任何效果.我希望你们能为我提供帮助.

It shots up any time and I am at my wits end. I also posted a bug on MySQL bugs and solutions are not proving to be effective in any way.I hope you guys can help me out.

以下是MySQL Bug的链接,以获取详细信息:似乎从未消失

Here is the link to MySQL Bug for details: Never seems to go away!

更多详细信息:我有一个客户端服务器系统,但是当服务器系统上本地运行的应用程序尝试运行查询时,此错误会在服务器系统(安装MySQL数据库)上发生.

Some more detail: I have a client-server system but this bug occurs on the server system(where MySQL database is installed) when a local running app on the server system tries to run a query.

我已经在此处提出了一个问题,但此问题已经死了.只是警告,我认为skip-name-resolve解决了该问题,但似乎只是降低了频率.希望这次有人能帮助我.

I had already opened a question here but since has been dead. Just a caveat I thought that skip-name-resolve solved the issue but it seems to just have lowered the frequency. Hope someone would help me out this time around.

编辑:MySQL专家说,如果长时间不使用连接,则在客户端服务器设置服务器中可能会关闭连接.但是,这不是我要面对的问题,因为每次我要执行查询时都会创建一个新连接.我在关于MySQL Bug的最新评论中明确了这一点.

EDIT: The MySQL guys say that in a client server setup server may close a connection if it is unused for a long time. However, this is not what I am facing as I create a new connection everytime I want to execute a query. I made this point clear in the last comment on the MySQL Bugs.

推荐答案

我尝试了以下方法:连接字符串中为"SslMode = None",但是如果您需要SSL,请阅读以下内容: http://www.voidcn.com/article/p-phfoefri-bpr.html

Guys I tried this: "SslMode=None" in the connection string, but if you need SSL then read this: http://www.voidcn.com/article/p-phfoefri-bpr.html

这是一个有效的示例连接字符串:

here is a sample connection string that works:

connectionString="Server=192.168.10.5;Database=mydata;Uid=root;Pwd=****;SslMode=None" 

希望这对您有帮助

这篇关于从流读取失败-mysql_native_password错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆