Recently, I switched to Python 3 (3.1 on a FreeBSD system), and i would like to work with MySQL databases.
- First i tried to use pymysql3-0.4, but it failed when i used SUM in my query with this error:
, TypeError(“Cannot convert b’46691486′ to Decimal”,)) - Then i tried oursql-0.9.2, but it seems it has no unix socket support (the documentation write otherwise but it doesn’t recognize the socket protocol.)
- Last i decided to give a chance to mypysql-0.5.5 but the installation is failed.
Could you recommend me a properly working MySQL driver for Python 3, or at least solve one of these problems? I would be very greatfull.
The oursql documentation is a little tricky. :$ There is a list of Connection’s parameters, but it doesn’t contain the unix_socket parameter. If i set that and the the protocol parameter the whole thing is just work fine 🙂
If someone has trouble with inserting (get _statment charset AttributeError): https://bugs.launchpad.net/oursql/+bug/669184 change the lines in oursql.c with the code in the report, and rebuild it. (it will be fixed in 0.9.3)