Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python MySQL查询接口错误_Python_Mysql_Sql_Database_Mysql Connector - Fatal编程技术网

Python MySQL查询接口错误

Python MySQL查询接口错误,python,mysql,sql,database,mysql-connector,Python,Mysql,Sql,Database,Mysql Connector,在MySQL 5.5.23服务器上执行SQL查询时出现以下错误。 我使用的是从MySQl网站下载的MySQl连接器 mysql.connector.errors.InterfaceError:2013:查询期间与mysql服务器的连接中断 在Win 7上使用相同的查询id,但在Win XP上不使用 有人知道 我将MySql连接器1.0.5与Python2.6和PyQt一起使用 有时它会工作,有时我会出现此错误。您认为您正在一个环境中成功执行查询,而不是在另一个环境中 还有,你用的是什么语言?你能

在MySQL 5.5.23服务器上执行SQL查询时出现以下错误。 我使用的是从MySQl网站下载的MySQl连接器

mysql.connector.errors.InterfaceError:2013:查询期间与mysql服务器的连接中断

在Win 7上使用相同的查询id,但在Win XP上不使用

有人知道

我将MySql连接器1.0.5与Python2.6和PyQt一起使用


有时它会工作,有时我会出现此错误。

您认为您正在一个环境中成功执行查询,而不是在另一个环境中

还有,你用的是什么语言?你能发布你的代码吗?我猜是java吗?回答你的问题时,只需要一条错误信息,而不需要任何细节,是相当困难的

作为一种预感(也是一种疯狂的预感),当您在与数据库相同的服务器上执行代码时,是否成功地连接到数据库?是否只有在数据库服务器以外的服务器上执行代码时才会失败?如果是这样,请进入my.cnf并写出以下行:

bind-address=.....
然后重新启动mysql


这只是一个大胆的尝试,但请为您的问题添加更多细节。

根据MySQL Connector/Python 1.0.8的发行说明,这是一个驱动程序错误。这是在Connector/Python 1.0.8中解决的

Intermittent errors could occur on Windows systems: InterfaceError(errno=2013).
The cause was incorrect handling of sock.recv() library calls that returned less
data than was requested. (Bug #14829471, Bug #67303)
但1.0.8版使用了一些windows功能进行网络IP地址转换,这仅在windows Vista及以上版本中可用,而在Win XP中不可用

MySql Connector/Python 1.0.8中的此错误已报告,将在1.0.9中修复