libmysqld.dll & Python API seeking...

Gerhard Häring gh at ghaering.de
Wed Aug 13 11:21:38 EDT 2003


JZ wrote:
> On Wed, 13 Aug 2003 13:50:48 +0200, Gerhard Häring <gh at ghaering.de>
> wrote:
>  
>>MySQLdb can be built against MySQL 4.x. It should be certainly possible 
>>to make it work against the embedded version of MySQL. Last time I tried 
>>the result was that at .connect time it crashed. But if you invest more 
>>time than me (more than 2 minutes), you can probably get it working ;-)
> 
> It is not so easy, because I need Win32 version of such MySQLdb :( I
> try to compile the source using Bloodsheed DevC++ 4.9.8.1
> (http://www.bloodshed.net/) but without result. I added header files
> from Python 2.2.3 but it did not help. :(

The problem is that you can't use MINGW to compile against the MySQL 
libraries MySQL AB offers. AFAIC they reference LIBCMT while MINGW can 
only work with MSVCRT.

There used to be MySQL binaries/libraries for Windows that were built 
with a patched version of the MySQL sources and MINGW. Unfortunately, 
these are no longer available.

That's why I still use MSVC6 to build the MySQLdb binaries on win32 :-(

Btw. the method to build MySQLdb is to use distutils. If you use 
something else, you'd better know about your tools :)

If somebody manages to change MySQldb or its build process so that it 
can link to the embedded version of MySQL (on a more developer-friendly 
platform), I'll be happy to use this patch and create the corresponding 
win32 binaries.

But I won't put much effort in this myself, because I personally have 
exactly zero interest in MySQL. My only motivation for offering the 
binaries is to promote Python as a language for MySQL users.

-- Gerhard





More information about the Python-list mailing list