[Zope-DB] MySQL running on Windows2000

working4aliving working4aliving@hotmail.com
Wed, 22 Jan 2003 22:21:36 -0500


 Larry, this is what I did (NOTE: i'm not running zope as a service... i'm
running it in a bat file, it's only for dev, my "real" box is on *nix.  This
may actually be WHY it works (I don't have to hack the registry).

1) Install python C:\python21
2) Install mysql for python (it finds it)
3) Install zope (c:\zope) for me... i'm not a big fan of "program
files\blalbalblablab"
4) Drop the mysqldb product into the appropriate products dir (in my case
c:\zope\lib\python\products\*)
5) batch file to start ...
"C:\python21\python.exe" "C:\zope\z2.py" -D -P 8180 %1 %2 %3 %4 %5 %6 %7 %8
%9

(Yes, I do run it on port 8260 :) )
That's a cut and paste from my batch file, so the quotes are important.
PS: It's not that I don't trust zope on windows, I don't trust mysql ...
plus i'm doing stuff in postgresql, so w2k is strictly dev. for that.

There's no reason why this shouldn't work, BUT... you may not be able to run
it as a service... That's not a biggie for me.
Don't reload your machine.  i HATE reloading my machine.

Bob

ru----- Original Message ----
From: "McDonnell, Larry" <lmcdonnell@protonenergy.com>
To: "Zope-Db (E-mail)" <zope-db@zope.org>
Sent: Friday, January 17, 2003 8:50 AM
Subject: [Zope-DB] MySQL running on Windows2000


>
> Hi,
>
> I figure I would may one more effort in solving this problem. I load Zope
> 2.6. I installed Python-2.1.exe to
> give me the path needed for MySQL-python-0.9.2.win32-py2.1.exe. Before
> installing MySQL-python-0.9.2.win32-py2.1.exe, I changed the registry to
> point to this version of Python 2.1
>
> Windows2000 Registry
>
> Python-
>        |
>        pythoncore-
>                   |
>                   2.1-
>                       |
>                       installpath-
>                                   |
>                                   c:\program files\proton26\bin
>
> After installing MySQL-python-0.9.2,  the following files where placed in
> C:\Program Files\proton26\bin
>
>  Directory of C:\Program Files\proton26\bin
>
> 01/07/2003  09:09a      <DIR>          .
> 01/07/2003  09:09a      <DIR>          ..
> 09/24/2002  11:07a              12,052 LICENSE.txt
> 09/24/2002  11:07a              20,536 python.exe
> 09/24/2002  11:07a              20,537 pythonw.exe
> 09/24/2002  11:07a             708,666 python21.dll
> 06/22/2001  10:47a              65,604 PyWinTypes21.dll
> 01/07/2003  09:09a      <DIR>          DLLs
> 01/07/2003  09:09a      <DIR>          lib
> 01/17/2003  08:27a               3,886 MySQL-python.exe-wininst.log
> 01/17/2003  08:27a              18,432 RemoveMySQL-python.exe.exe
> 05/08/2001  11:23p               9,644 CompatMysqldb.py
> 09/23/2002  04:58a             172,032 _mysql.pyd
> 05/08/2001  11:23p               2,288 _mysql_exceptions.py
> 01/17/2003  08:27a      <DIR>          MySQLdb
> 01/17/2003  08:27a               4,507 _mysql_exceptions.pyc
> 01/17/2003  08:27a              16,427 CompatMysqldb.pyc
> 01/17/2003  08:27a               4,396 _mysql_exceptions.pyo
> 01/17/2003  08:27a              15,611 CompatMysqldb.pyo
>
>
>
> I moved the files from ZMySQLDA-2.0.8.tar.gz to the following:
>
>  Directory of C:\Program Files\proton26\lib\python\Products
>
> 08/14/2002  06:13p                 669 __init__.py
> 01/07/2003  09:09a      <DIR>          ExternalMethod
> 01/07/2003  09:09a      <DIR>          MailHost
> 01/07/2003  09:09a      <DIR>          MIMETools
> 01/07/2003  09:09a      <DIR>          OFSP
> 01/07/2003  09:09a      <DIR>          PageTemplates
> 01/07/2003  09:09a      <DIR>          PluginIndexes
> 01/07/2003  09:09a      <DIR>          PythonScripts
> 01/07/2003  09:09a      <DIR>          Sessions
> 01/07/2003  09:09a      <DIR>          SiteAccess
> 01/07/2003  09:09a      <DIR>          SiteErrorLog
> 01/07/2003  09:09a      <DIR>          StandardCacheManagers
> 01/07/2003  09:09a      <DIR>          TemporaryFolder
> 01/07/2003  09:09a      <DIR>          Transience
> 01/07/2003  09:09a      <DIR>          ZCatalog
> 01/07/2003  09:09a      <DIR>          ZCTextIndex
> 01/07/2003  09:09a      <DIR>          ZGadflyDA
> 01/07/2003  09:09a      <DIR>          ZopeTutorial
> 01/07/2003  09:09a      <DIR>          ZSQLMethods
> 01/07/2003  09:10a                 180 __init__.pyc
> 04/15/2002  08:42a      <DIR>          ZODBCDA
> 05/15/2002  02:28p      <DIR>          CMFCalendar
> 05/15/2002  02:28p      <DIR>          CMFCore
> 05/15/2002  02:28p      <DIR>          CMFDefault
> 05/15/2002  02:28p      <DIR>          CMFTopic
> 01/07/2003  09:20a      <DIR>          SQLFormsReporter
> 01/07/2003  09:20a      <DIR>          SQLForms
> 01/07/2003  09:26a      <DIR>          ZMySQLDA
>
> I  started the start.bat file but still see this error.
>
> C:\Program Files\proton26>"C:\Program Files\proton26\bin\python.exe"
> "C:\Program
>  Files\proton26\z2.py" -D
> ------
> 2003-01-17T08:27:54 ERROR(200) Zope Could not import Products.ZMySQLDA
> Traceback (innermost last):
>   Module OFS.Application, line 541, in import_product
>   Module Products.ZMySQLDA, line 106, in ?
>   Module Products.ZMySQLDA.DA, line 108, in ?
>   Module Products.ZMySQLDA.db, line 106, in ?
> ImportError: No module named MySQL
>
> My path is as follows:
>
> C:\Program Files\proton26\lib\python\Products>path
> PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Common F
> iles\Adaptec
> Shared\System;O:\INFISY\SP2;O:\INFISY\WRUN;c:\python21\.;c:\winnt\s
> ystem32;c:\winnt\system32\wbem;
>
> I am trying to avoid re-installing Windows 2000 on my Notebook. I use it
for
> other things and this is my Zope development system.  I am hoping the Zope
> gurus can point me in the right directions.
>
>
> Larry McDonnell
>
> Proton Energy Systems
> 10 Technology Drive
> Wallingford, CT 06492
> (203) 678-2181
> Email:lmcdonnell@protonenergy.com
> www.protonenergy.com
>
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://lists.zope.org/mailman/listinfo/zope-db
>