Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

libmysqld.dll - any working example?

9 views
Skip to first unread message

JZ

unread,
Nov 26, 2003, 6:30:50 AM11/26/03
to
Does anybody know any working example of using embedded MySQL library
for Win32 (libmysqld.dll)? That example from MySQL manual does not
work for me. I am looking for Python API to libmysqld.dll...

--
JZ

Joe Francia

unread,
Nov 26, 2003, 12:31:35 PM11/26/03
to
JZ wrote:
> Does anybody know any working example of using embedded MySQL library
> for Win32 (libmysqld.dll)?That example from MySQL manual does not

> work for me. I am looking for Python API to libmysqld.dll...

You may want to consider this, which doesn't require you to ship any
external DLLs:
http://sourceforge.net/projects/mysql-python

Joe

JZ

unread,
Nov 28, 2003, 5:50:06 PM11/28/03
to
On Wed, 26 Nov 2003 17:31:35 GMT, Joe Francia <use...@soraia.com>
wrote:

No, you did not understand me. I know this library and I have been
using it for a long time. But the problem is I want to move my web
(pythonic) application to CD and I wanted it to work with MySQL as a
DLL library. I do not want to install full mysql serwer.
I know how to use MySQLdb connection for a server, but I do not know
how to connect to that dll. If MySQLdb can do this I do not know how
use it. (MySQLdb.Connect() method has parameters of host, login but
libmysql.dll do not need such parameters.)

--
JZ


JZ

unread,
Nov 28, 2003, 8:51:21 PM11/28/03
to

> If I understand my book (hmmm, looks like New Riders has been
>swallowed by SAMS and renamed to "Developer's Library"), that DLL would
>have to be specified to the linker in place of the regular client
>protocol library. If so, to get Python to use it will likely require
>rebuilding the MySQLdb modules changing the linkage option.

Do you know how to rebuild this module using Visual Studio 7 instead
of v6? Is it possible?

--
JZ

JZ

unread,
Nov 28, 2003, 10:15:25 PM11/28/03
to
On Sat, 29 Nov 2003 01:00:34 GMT, Dennis Lee Bieber
<wlf...@ix.netcom.com> wrote:

> If I understand my book (hmmm, looks like New Riders has been
>swallowed by SAMS and renamed to "Developer's Library"), that DLL would
>have to be specified to the linker in place of the regular client
>protocol library. If so, to get Python to use it will likely require
>rebuilding the MySQLdb modules changing the linkage option.

I recompiled MySQLdb but I still do not know how to connect to embed
server... :( MySQL.Connect(host=...)???? There is no example nor
explanation. Not at all.

--
JZ

Joe Francia

unread,
Nov 29, 2003, 3:40:56 AM11/29/03
to

Unless you're totally married to MySQL, you may want to consider using
one of the embeddable databases for Python, such as Sleepycat's
Berkeley, Metakit, PySQLite, Kinterbase, etc. I've used Berkeley,
Metakit and PySQLite, and they're all very good, each serving somewhat
different needs. Shouldn't be too much effort to pull the data out of
MySQL and into something else.

Peace,
Joe

JZ

unread,
Nov 29, 2003, 4:07:04 AM11/29/03
to
On Sat, 29 Nov 2003 08:40:56 GMT, Joe Francia <use...@soraia.com>
wrote:


>Unless you're totally married to MySQL, you may want to consider using
>one of the embeddable databases for Python, such as Sleepycat's
>Berkeley, Metakit, PySQLite, Kinterbase, etc. I've used Berkeley,
>Metakit and PySQLite, and they're all very good, each serving somewhat
>different needs. Shouldn't be too much effort to pull the data out of
>MySQL and into something else.

I do not want to use other database because my application *have to*
work in full mysql server *and* (with _very_ little effort) with embed
sql *without changing any sql queries*. It is multiplatform
application (MySQL/Linux & MSSQL2k/Win32) I thought about SQlite, but
it is no compatible with some queries. and I do not want to parse them
with regular expressions.

I checked mysql.h and I found the following piece of code:

/*
Set up and bring down the server; to ensure that applications will
work when linked against either the standard client library or the
embedded server library, these functions should be called.
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
void STDCALL mysql_server_end(void);

Those functions seems to be *no implemented* in MySQLdb (I could not
find them in _mysql.c file) :(

If I understood the comment above, MySQLdb could be compiled with
standard client library or with embed server library - not with both
of them, right? :(

--
JZ

0 new messages