It is probably too late to be useful, but I was able to connect from Python 3.3 to MySQL db on my Windows machine (!) Using PyMySql (see https://code.google.com/p/pymysql/ ). After installation, I used a version of the code from your reference location here: Python 3 and MySQL . I have a diagram called "test" and a table called "users", here is the test code:
import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='password', db='mysql') cur = conn.cursor() cur.execute("SELECT * FROM test.users") for r in cur: print(r) cur.close() conn.close()
source share