Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Connection reset by peer when receiving #20

Closed
ericyue opened this issue Jul 7, 2012 · 8 comments
Closed

Connection reset by peer when receiving #20

ericyue opened this issue Jul 7, 2012 · 8 comments

Comments

@ericyue
Copy link

ericyue commented Jul 7, 2012

cnn.connect ('a internal ip address which running mysql (some old version)', 3306,'user','pwd', "bugzilla")
cnn.query("show tables")
Traceback (most recent call last):
File "", line 1, in
umysql.Error: (0, 'Connection reset by peer when receiving')

sometimes show :

cnn.query("select count(*) from bugs")
Traceback (most recent call last):
File "", line 1, in
umysql.SQLError: (1043, 'Bad handshake')

@ericyue
Copy link
Author

ericyue commented Jul 8, 2012

add:
SHOW VARIABLES LIKE 'old_passwords'
result is ON

how to solve this problem (i donnt have the permisson to modify the mysql server )

@ivanjr0
Copy link

ivanjr0 commented Sep 25, 2012

I'm dealing exactly with the same problem. Anyone can give some information about it? I can't modify the server as well.

>>> import umysql
>>> c = umysql.Connection()
>>> c.connect(host, port, user, password, db)

>>> c.query('SELECT 1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
umysql.Error: (0, 'Connection reset by peer when receiving')

>>> c.close()
>>> c.connect(host, port, user, password, db)
>>> c.query('SELECT 1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
umysql.SQLError: (1043, 'Bad handshake')

@jskorpan
Copy link

jskorpan commented Oct 1, 2012

Can't reproduce, please provide a repro if you want me to have a look at this

@jskorpan jskorpan closed this as completed Oct 1, 2012
@echocolate
Copy link

any answers for this issue?

@jskorpan jskorpan reopened this Jan 7, 2013
@jskorpan
Copy link

jskorpan commented Jan 7, 2013

As stated earlier, the issue can't be reproduced.

Using head revision and Python on Win32 and MySQL server 5.5 I get the expected behavior:
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

import umysql
c = umysql.Connection()
c.connect("127.0.0.1", 3306, "XXX", "XXX", "test")
c.query("SELECT 1")
<umysql.ResultSet object at 0x01C8F2D8>

What server/OS/setup are you on?

@LeeXiaolan
Copy link

The problem is located. See LeeXiaolan@fdb8b31

@V-E-O
Copy link

V-E-O commented Jun 27, 2013

This issue still happens when connection lost or closed long time not-alive, even is_connected tested True, then any query could lead this error.

@Anuradha-26
Copy link

I get the same error (0, 'Connection reset by peer when receiving') with mysql server occasionally when executing "roll back" query. What is the cause of such error? Is the connection to the server timing out?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants