Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

So, looking for a mysql-db-lib that is compatible with py3k/py3.0/py3000, any ideas? google turned up nothing.

share|improve this question
Is python 3.0 an absolute requirement? If so, "Why?" and "Are you sure?" etc.. – Ali Afshar Dec 21 '08 at 13:40

8 Answers

up vote 1 down vote accepted

As for future plans of MySQLdb, you might want to ask the author (Andy Dustman).
His blog is here: http://mysql-python.blogspot.com/

share|improve this answer
For those finding this post 4.5 years later like me, according to your post, mysql-db support for Python 3 is coming soon, based on that blog. Woohoo. – Nick Mar 16 at 3:07

You're probably better off using Python 2.x at the moment. It's going to be a while before all Python packages are ported to 3.x, and I expect writing a library or application with 3.x at the moment would be quite frustrating.

share|improve this answer

not sure if you're still looking, but you could try this: http://sourceforge.net/projects/mypysql/

share|improve this answer
1  
Interesting. Note that this is a really minimal lib, with very few features and no PEP 249 support. – itsadok Nov 24 '09 at 8:11

I was looking for it too, but also found nothing, so I ported MySQL-python-1.2.3 to py3k you can read it here https://sourceforge.net/projects/mysql-python/forums/forum/70460/topic/3831691

share|improve this answer

It appears the MySQLdb is pretty much a dead project. However, pymysql is a dbapi compliant, pure-python implementation of a mysql client, and it has python 3 support.

EDIT: There's also MySQL Connector/Python. Same idea.

share|improve this answer

You can download the mysql-connector-python module compatible with Python3:

http://rpm.pbone.net/index.php3/stat/4/idpl/15667200/dir/rawhide/com/mysql-connector-python3-0.3.2-2.fc16.noarch.rpm.html

Get the "source RPM", unzip it and use it (e.g. put it in your PYTHONPATH, and look at the examples).

share|improve this answer

There is an official Python 2/3 library, downloadable from MySQL website. Oracle released version 1.0.7 to public on 29 September 2012.

It's pure Python and works with MySQL 4.1+

See more details here: http://dev.mysql.com/doc/connector-python/en/connector-python.html

I'm currently using it with MySQL 5.5 and Python 3.2 with no problems thus far :)

share|improve this answer

Here is a working repository for Python 3: https://github.com/davispuh/MySQL-for-Python-3

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.