[Zope] win32 - best DBMS with Zope?

Igor Leturia IGOR@emun.com
Mon, 17 Jun 2002 15:21:01 +0200


>Having read a bit, I concluded the open source
>DBMS to use with Zope was mySQL. Easier
>said than done under win32, I've discovered.

You're right, installing ZMySQLDA under windows is really difficult. I
got it thanks to a doc I found I don't know where (maybe Derek sent it
to me), but here you are.

					Igor Leturia



	Here's a document that says how I got it working.  It would be
nice if this could be turned into a "Howto" on the Zope.org website, but
I
don't have an account there.

--Derek

-------------------------

	Ever try to get a MySQL server and Zope running under
MS-Windows?

	Here's what I had to do.  And no, I didn't find this documented
anywhere.  This was a bit challenging as I haven't really used
MS-Windows
for anything other than gaming in about 5 years.


1. Install and start Zope
2. Install and start MySQL server (I'm using mysqld-opt.exe)
3. Install ZMySQLDA
	(*) You need a Windows program that can handle tarballs, as=20
ZMySQLDA, like most Zope "Products", is not distributed as a .zip file

4. Restart Zope
5. Notice that the ZMySQLDA Product is showing as "broken" in the Zope
Control Panel, because you are missing the MySQL-python interface
library
(distributed separately)

6. Try to install MySQL-python (filename
"MySQL-python-0.9.1.win32-py2.1.exe")
	(*) This will fail, because the Windows installer program will
only unpack the files if it can find a "Python Installation" directory
to=20
unpack it into.  There is no way to specify your Zope Python install as
it=20
will only let you choose a Python install that is finds in the registry
(I=20
*think*).  I.e., you fscking NEED Python to get access to the files.  A=20
.zip file was not available for download.

7. Download and install the win32 Python 2.1.2 (to match your Zope
2.5.0's=20
Python)

8. Now install MySQL-python (it should work this time)

9. Restart Zope, and notice that the ZMySQLDA Product is broken, because

it is not finding the MySQL-python interface library

10. At this point, you'll need to either (a) have payed attention to the

directories the Windows Installers used, or (b) go surfing around your=20
hard drive until you find where Zope, Python, and MySQL-python were=20
placed.  For me it was (b).

11. Identify the files needed for MySQL-python.  Since MS-Window's
package=20
management system doesn't provide an "rpm -ql" equivalent, I guessed
this=20
to be

C:\Python21\
	_mysql.pyd
	_mysql_exceptions.py
	_mysql_exceptions.pyc
	_mysql_exceptions.pyo
	MySQLdb/   [dir with all contents]

	...then I copied those files into the directory

C:\Program Files\Demo\lib\python

	That "Demo" is the name of the directory Zope was installed
into.

12. Restart Zope.


	Is is working?  Seems to be... I can talk to the database from
Zope.  It is correct and stable?  Fsck if I know.



--Derek