Closed ericyue closed 11 years ago
add:
SHOW VARIABLES LIKE 'old_passwords'
result is ON
how to solve this problem (i donnt have the permisson to modify the mysql server )
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')
Can't reproduce, please provide a repro if you want me to have a look at this
any answers for this issue?
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?
The problem is located. See https://github.com/LeeXiaolan/ultramysql/commit/fdb8b3147ef8b928bccfad33021297f11b3e157e
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.
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?
sometimes show :