[Zope] mysql

Norman Khine khine@btinternet.com
Sat, 30 Jun 2001 23:56:20 +0100


There are three steps to get MySQL working with zope
1. download and install http://sourceforge.net/projects/mysql-python
mysql-python, this will ensure that python can talk to mysql
2. download and install again from
http://sourceforge.net/projects/mysql-python zmysqlda 2.0.7, make sure you
install this in your zope directory
3. restart your zope server

things to watch out for:

1. when you build mysql-python, ensure you edit the setup.py file, you will
have couple of lines which:

elif sys.platform in ("freebsd4", "freebsdRELENG_4_2001_03_07"):
    include_dirs = ['/usr/local/include/mysql']
    library_dirs = ['/usr/local/lib/mysql']
    libraries = [mysqlclient, "z"]
    runtime_library_dirs = []
    extra_objects = []


change the freebsd4, or add an additional entry for the kernel name or build
name of your freebsd box, and make sure you know where you have installed
your mysql include_dirs and library_dirs.

Once you have installed this you can check from your python command prompt,
by:

>>import MySQLdb
>>

If this works then you should be able to connect zope to mysql by adding it
from your pull-down menu and creating a ZMySQL Database Connection

note that if you are using python 1.5, then you will need to install
Distutils, as this is required to build the mysql-python , better still you
should be working with python 2.1 as zope 2.4 will be based on this.

hth

norman

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Gustavo Vieira Goncalves Coelho Rios
Sent: 30 June 2001 23:10
To: zope@zope.org
Subject: [Zope] mysql


How may i make zope access MySQL database?



--
It's really quite a simple choice: Life, Death, or Los Angeles.

_______________________________________________
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 )