updated 8/31/07 Zope2.10.4-and-MySQL5.0.45-Windows.zip (874 k)
This zip archive contains all files necessary to connect Zope -> Python -> MySQL in Windows 2000/Windows XP (32 bit).
August 31, 2007 Versions these files **APPEARED** to work with (see DISCLAIMER below): Zope 2.10.4 MySQL 5.0.45 Other combinations, more recent versions, past versions, etc. of the above, below, and included files may be preferable. I have no idea. These files worked for me. Your mileage may vary. See the disclaimer below. I'm putting these instructions online with all the files in one place because there is little to no documentation available on connecting Zope to MySQL in Windows XP. (Though it has gotten easier - four years ago it was almost impossible for a Windows user without a Unix background.) I hope someone will find the following useful. -- INSTALLATION 1. Shutdown Zope if running. 2. Copy the directory and files MySQLdb _mysql.pyd _mysql.exceptions.pyc _mysql.exceptions.pyo to the lib/python/ directory inside your Zope instance. In a generic default install of Zope the location will be: C:\Zope\Instance\2.10.4\lib\python\ MySQLdb (MySQL for Python) 1.2.2 allows Python to access MySQL using the Python DB API 2.0 syntax. This version of MySQLdb uses Python 2.4. (The version of Python installed by the Zope 2.10.4 installer is 2.4.4.) Older/newer versions of Python (2.3, etc.) will not work with these files, but a version of MySQLdb which does is available from the sourceforge link below. (Source: http://sourceforge.net/projects/mysql-python ) 3. Copy the directory ZMySQLDA to the Products/ directory inside your Zope instance. In a generic default install of Zope the location will be: C:\Zope\Instance\2.10.4\Products This is the database adaptor used inside Zope. (ZMySQLDA 2.0.9b3) (Source: http://sourceforge.net/projects/mysql-python ) 4. Restart Zope. Upon starting Zope you will see a few depreciation warnings. These are no cause for alarm, however ZMySQLDA will apparently need to be updated to work with Zope versions 2.11 and above. If the database adaptor is installed correctly, the item Z MySQL Database Connection should be available in the "add" dropdown list and ZMySQLDA should be listed in the collapsable Products menu (under Control Panel) in the left frame. You probably need to have installed MySQL and created at least 1 database to add the connection object. The connection string is database user password or if there is no user/password simply database Click on the connection object to "browse" the database items or enter "test" SQL queries. If you can browse the database and successfully enter SQL instructions, the connection between Zope and MySQL **MAY** be complete. (See below.) -- FINISHED Huge-ass DISCLAIMER: These files/instructions *APPEARED* to work for me. Your mileage may vary. I guarantee nothing. NOTHING. Use this at your own risk, your computer may explode, I am not responsible, if you listen to me you're an idiot, etc. etc. Aaron Maupin firstname.lastname@example.org August 31, 2007
Previous versions of these files, which worked with Zope 2.9.1 and MySQL 5.0, and perhaps other combinations, are available here.
Even older versions of these files, which worked with Zope 2.6.2 and MySQL 4.0.15, and perhaps other combinations, are available here.