MySQL v5.5 is GA, but is it working with Python? Yes, it does. Below you’ll find some quick, small tests I did with MySQLdb, oursql and our own MySQL Connector/Python.

My desktop is a Mac, but when it works on that, I’m sure it works elsewhere too. If not, just let us know!

MySQL for Python (aka MySQLdb)

Installing MySQL v5.5.8 64-bit from tar ball on MacOS X 10.6, it compiled fine and the module loaded giving me the expected result:

python >>> import MySQLdb >>> cnx = MySQLdb.connect(user='root') >>> cur = cnx.cursor() >>> cur.execute("SELECT VERSION()") 1L >>> print cur.fetchall() (('5.5.8',),)


oursql is an alternative for MySQLdb. Both are using the MySQL C API and thus need to be compiled from source (if you don’t find binaries of course).

python >>> import oursql >>> cnx = oursql.connect(user='root') >>> cur = cnx.cursor() >>> cur.execute("SELECT VERSION()") >>> print cur.fetchall() [(u'5.5.8',)]

MySQL Connector/Python

Our own MySQL Connector/Python doesn’t need compiling and doesn’t need any MySQL software installed to be able to connect to a MySQL server. Current unittests run fine against MySQL v5.5.8.

python >>> cnx = mysql.connector.connect(user='root') >>> cur = cnx.cursor() >>> cur.execute("SELECT VERSION()") -1 >>> print cur.fetchall() [(u'5.5.8',)]


One can’t really conclude anything with the simple tests above, but it looks like MySQL v5.5 will work fine with Python.