前事不忘,后事之师,不忘国耻!

 立即注册  找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4979|回复: 1

Installing MySQLdb and ZMySQLDA for Zope in Windows 2000/Windows XP

[复制链接]

Installing MySQLdb and ZMySQLDA for Zope in Windows 2000/Windows XP

[复制链接]
ehxz

主题

0

回帖

3万

积分

管理员

积分
37090
2005-7-9 14:14:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
<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>
免责申明1、欢迎访问本站,本文内容及相关资源来源于网络,版权归版权方所有!本站原创内容版权归本站所有,请勿转载!
2、本文内容仅代表作者观点,不代表本站立场,作者自负,本站资源仅供学习研究,请勿非法使用,否则后果自负!请下载后24小时内删除!
3、本文内容,包括但不限于源码、文字、图片等,仅供参考。本站不对其安全性,正确性等作出保证。但本站会尽量审核会员发表的内容。
4、如本帖侵犯到任何版权问题,请立即告知本站 ,本站将及时删除并致以最深的歉意!客服邮箱:admin@fmlist.com
ehxz 楼主

主题

0

回帖

3万

积分

管理员

积分
37090
2005-7-10 09:30:02 | 显示全部楼层
<>按上面的处理后,报下面的错:</P>
<H3>Import Traceback</H3><RE>Traceback (most recent call last):
  File "C:\Program Files\Plone 2\Zope\lib\python\OFS\Application.py", line 654, in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "C:\Program Files\Plone 2\Zope\lib\python\Products\ZMySQLDA\__init__.py", line 91, in ?
    import DA
  File "C:\Program Files\Plone 2\Zope\lib\python\Products\ZMySQLDA\DA.py", line 92, in ?
    from db import DB
  File "C:\Program Files\Plone 2\Zope\lib\python\Products\ZMySQLDA\db.py", line 89, in ?
    import _mysql
ImportError: DLL load failed: 找不到指定的模块。
</PRE>[em01]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|爱谁谁社区 ( 鲁ICP备14013101号-3 )

GMT+8, 2024-5-4 05:31 , Processed in 0.075263 second(s), 8 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表