[Zope-DB] Very basic MySQL/Windows installation question

Geoff Gardiner ggardiner@accelrys.com
Tue, 17 Sep 2002 12:08:30 +0100


I have spent some hours trying to work out how to install MySQL and hook it
to Zope in a Windows environment. Most of those hours have been spent
trawling the newsgroups and following those links that aren't broken - but
without reaching any true enlightment.

It seems so simple in overview, but I'm stuck with the MySQLdb bit. Where
does Win32_Py21_mysql-python091.pyd actually go? I have put it in
Website\lib\python but the MySQLDA product fails to install, giving the
message "ImportError: No module named _mysql".

I've been trying to understand MySQLdb, but all I can see is that it has
changed character between versions 2.0.7 (which seems to need compilation)
and 2.0.8 (which is a .pyd).

Can anyone point me in the right direction here?

Details so far:

1) Zope: Downloaded and installed Zope 2.5.1 to C:\Program Files\Website.
Check it starts Ok.

2) MySQL: Downloaded and installed MySQL 3.23.52 to C:\mysql. Check it
tests out Ok.

3) MySQL-Python: Downloaded Win32_Py21_mysql-python091.zip, which contains
Win32_Py21_mysql-python091.pyd. Assume it goes into Website\lib\python as
other .pyd files.

4) MySQLDA: Downloaded ZMySQLDA-2.0.8.tar.gz and dropped into Zope Products
to create a ZMySQLDA folder and contents.

5) Restart Zope and view the ZMySQLDA product. Results:
Import Traceback
Traceback (most recent call last):
  File "C:\PROGRA~1\WebSite\lib\python\OFS\Application.py", line 531, in
import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "C:\PROGRA~1\WebSite\lib\python\Products\ZMySQLDA\__init__.py", line
91, in ?
    import DA
  File "C:\PROGRA~1\WebSite\lib\python\Products\ZMySQLDA\DA.py", line 92,
in ?
    from db import DB
  File "C:\PROGRA~1\WebSite\lib\python\Products\ZMySQLDA\db.py", line 89,
in ?
    import _mysql
ImportError: No module named _mysql

Thank you,
Geoff