马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
<H3>Installing MySQLdb and ZMySQLDA for Zope in Windows 2000/Windows XP</H3>
<><a href="http://www.pastrytech.com/willy/Zope-and-MySQL-Windows.zip" target="_blank" >Zope-and-MySQL-Windows.zip</A> (184 k)
<>Included readme.txt:
<><RE>November 22, 2003
Versions these files **APPEARED** to work with (see DISCLAIMER below):
Zope 2.6.2
MySQL 4.0.15
Other combinations, more recent versions, past versions, etc. of the
above, below, and included files may be preferable. I have no idea.
All other combinations of the packages below (MySQLdb and ZMySQLDA)
that I tried caused Zope to fail upon startup or required a C compile.
I'm putting these instructions online with all the files in one package
because it was a major pain to get MySQL support for Zope in Windows XP,
with little to no documentation available. I hope someone will find the
following useful.
(Since I put this online a month ago, at least 2 people have reported
that the following files and instructions also work with Windows 2000,
so I now mention it as well.)
-- INSTALLATION
1. <FONT color=darkblue>Shutdown Zope if running.</FONT>
2. <FONT color=darkblue>Copy the directory and files
MySQLdb
_mysql.pyd
_mysql.exceptions.py
_mysql.exceptions.pyc
_mysql.exceptions.pyo
t YourZopeInstallDir/lib/python/</FONT>
MySQLdb (MySQL for Python) 0.9.1 allows Python to access MySQL using
the Python DB API 2.0 syntax. Versions for Python 2.2 and greater
don't seem to work. (At this writing, the current Python is version
2.3.)
(Source: http://sourceforge.net/projects/mysql-python )
2. <FONT color=darkblue>Copy the directory
ZMySQLDA
t YourZopeInstallDir/lib/python/Products/</FONT>
This is the database adaptor used inside Zope.
(Available from the same link above.)
3. <FONT color=darkblue>Restart Zope.</FONT>
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 menu (Products)
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
with Zope 2.6.2 and MySQL 4.0.15 on Windows XP Home Edition (5.1 Build
2600). 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
maupin@pastrytech.com
November 22, 2003</PRE><RE><a href="http://www.pastrytech.com/willy/zopemysql.html" target="_blank" >http://www.pastrytech.com/willy/zopemysql.html</A></PRE> |