[Zope] Making a Database Connection to MySQL

Jens Vagelpohl tommymi@concentric.net
Sat, 25 Sep 1999 11:16:17 -0400


hi james,

the ZMySQLDA database adapters are in the download section of the zope
website. follow the directions to install it. in order to compile it, like
rob said, you need to have the MySQL-devel package installed (if you do
rpms), if you built MySQL yourself all that is already in place.

after compiling the ZMySQLDA package and restarting zope you'll find a new
item in the "add" drop-down list in the management interface, a ZMySQL
connection.

the ZMySQLDA adapter as it stands should only be used with a single-thread
zope instance. you need to use the "-t 1" switch when starting zope or you
can just add it into the "start" script.

jens

Jens Vagelpohl

Systems Administrator
Washtenaw Development Council


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Rob
> Page
> Sent: Saturday, September 25, 1999 08:17
> To: 'James Punteney'
> Cc: 'zope@zope.org'
> Subject: RE: [Zope] Making a Database Connection to MySQL
>
>
> > I'm looking at switching from using PHP to Zope for an intranet
> > application.  The problem is I can't find how to add another
> > database (in
> > this case a MySQL DB).  Basically I've installed Zope 2.0.1
> > and everything
> > is working, now what do I have to connect to MySQL.
>
> [Caveat reader - I don't know MySQL] You need to install the MySQL
> client libraries and get to the point where you can run character mode
> queries from the client.  Then, install the MySQL Database Adapter (DA)
> into your Zope distribution.  Restart Zope and you should be off to the
> races!
>
> --Rob
>
> P.S. - I am not sure of the current status of the MySQL DA vis-a-vis
> concurrency -- some DAs are not threadsafe requiring you to run Zope 2
> in single-threaded mode :^(
>