esnme/ultramysql — Issue #7: connecting to AWS RDS instance fails
Author: fevral13
Created: 2012-02-12 10:27:05+00:00
State: open

When I try to connect with ultramysql to Amazon's db instance, I get weird exception:

In [1]: import umysql

In [2]: conn = umysql.Connection()

In [3]: conn.connect('xxxxx.us-east-1.rds.amazonaws.com', 3306, 'xxxxx', 'xxxxx', 'xxxxx')
---------------------------------------------------------------------------
SystemError Traceback (most recent call last)
/home/fevral13/ in ()
----> 1 conn.connect('xxxxx.us-east-1.rds.amazonaws.com', 3306, 'xxxxx', 'xxxxx', 'xxxxx')

SystemError: error return without exception set

In [4]: conn.is_connected()
Out[4]: True

In [5]: conn.query('select 1')
---------------------------------------------------------------------------
Error Traceback (most recent call last)
/home/fevral13/ in ()
----> 1 conn.query('select 1')

Error: (0, 'Connection reset by peer when receiving')

But when I use pymysql, for example, everything works:

In [6]: import pymysql

In [7]: c = pymysql.Connect(host='xxxxx.us-east-1.rds.amazonaws.com', port=3306, user='xxxxx', passwd='xxxxx', db='xxxxx')

In [8]: c.query('select 1')
Out[8]: 1

So the db is up and connectable