Re: Mini-HOWTO: Zope + MySQL under Windows
I solved this problem in a similar manner, but in a slightly different order: 1, 2 (Im using 3.23.49a "max"), 7 (From http://www.activestate.com/Products/Download/Get.plex?id=ActivePython), 8, 11, 3, then 4. I dont end up with the "broken package" problem you describe, and things do seem to be working. Bob. On Mon, 11 Mar 2002 11:25:04 -0500 zope-request@zope.org wrote:
Date: Sun, 10 Mar 2002 23:04:15 -0800 (PST) From: Derek Simkowiak <dereks@realloc.net> To: <zope@zope.org> Subject: [Zope] Mini-HOWTO: Zope + MySQL under Windows
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 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 unpack it into. There is no way to specify your Zope Python install as it will only let you choose a Python install that is finds in the registry (I *think*). I.e., you fscking NEED Python to get access to the files. A .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 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 hard drive until you find where Zope, Python, and MySQL-python were placed. For me it was (b).
11. Identify the files needed for MySQL-python. Since MS-Window's package management system doesn't provide an "rpm -ql" equivalent, I guessed this 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
-- Robert A. Klahn rklahn@acm.org AIM: rklahn Yahoo Messenger: klahn IRC: rklahn@irc.openprojects.net "Hope has two beautiful daughters: Anger and Courage. Anger at the way things are, and Courage to struggle to create things as they should be." - St. Augustine
(*) You need a Windows program that can handle tarballs, as ZMySQLDA, like most Zope "Products", is not distributed as a .zip file
Most Zope products are tarballs, due to the *nix centric community. But last time I checked winzip, power archiver etc all did tar balls.
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 unpack it into. There is no way to specify your Zope Python install as it will only let you choose a Python install that is finds in the registry (I *think*). I.e., you fscking NEED Python to get access to the files. A .zip file was not available for download.
Yep, but this is a fault of most python installers and a bit the Zope installer. I would fully recommend installing your own python such as ActivePython with the win32 extension built in and then you are done.
7. Download and install the win32 Python 2.1.2 (to match your Zope 2.5.0's Python)
You're right thought it aint straightforward. -- Andy McKay
A Zope/MySQL installer that installs into the Zope hierarchy is available at http://www.cs.fhm.edu/~ifw00065/index.shtml. It says that it's for Zope 2.4.x but also works with 2.5. ----- Original Message ----- From: "Andy McKay" <andy@agmweb.ca> To: <zope@zope.org> Sent: Tuesday, March 12, 2002 5:02 AM Subject: Re: [Zope] Re: Mini-HOWTO: Zope + MySQL under Windows
(*) You need a Windows program that can handle tarballs, as ZMySQLDA, like most Zope "Products", is not distributed as a .zip file
Most Zope products are tarballs, due to the *nix centric community. But last time I checked winzip, power archiver etc all did tar balls.
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 unpack it into. There is no way to specify your Zope Python install as it will only let you choose a Python install that is finds in the registry (I *think*). I.e., you fscking NEED Python to get access to the files. A .zip file was not available for download.
Yep, but this is a fault of most python installers and a bit the Zope installer. I would fully recommend installing your own python such as ActivePython with the win32 extension built in and then you are done.
7. Download and install the win32 Python 2.1.2 (to match your Zope 2.5.0's Python)
You're right thought it aint straightforward. -- Andy McKay
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Andy McKay -
Phil Harris -
Robert A. Klahn