C#的远程MySQL Server [英] Remote MySQL Server for C#

查看:108
本文介绍了C#的远程MySQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用 TcpClient 连接远程MySQL服务器时,出现以下错误消息:

When I try to use TcpClient to connect the remote MySQL server, I get following error message:

主机"xxxxxxxx"由于许多连接错误而被阻止;使用"mysqladmin flush-hosts"取消阻止
Host ''xxxxxxxx'' is blocked because of many connection error; unblock with ''mysqladmin flush-hosts''



你知道出什么事了吗?我该如何解决?

这是我的代码



Do you know what is wrong? How can I fix it?

Here is my code

TcpClient socketForServer = new TcpClient("xxxxx", 3306); 
NetworkStream networkStream = socketForServer.GetStream(); 
StreamReader streamReader = new StreamReader(networkStream); 
System.Console.WriteLine(streamReader.ReadLine());

推荐答案

看看这个: ^ ]


这仅表示您已达到max_connect_errors变量中定义的连接错误限制.

可能是数据库上的配置设置.

请参阅本文以调整您的配置文件.

http://dev.mysql.com/doc/refman/5.0/zh-CN/blocked- host.html [ ^ ]
It simply means that you have reached the connection error limit that is defined in max_connect_errors variable.

Could be a config setting on your database though.

Refer to this article for tweaking your config file.

http://dev.mysql.com/doc/refman/5.0/en/blocked-host.html[^]


这篇关于C#的远程MySQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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