[Zope] help with MySQL installation

Sam Gendler sgendler@impossible.com
Tue, 28 Dec 1999 18:30:30 -0800


CURTIS David wrote:

> Hi,
>
> I'm trying to get MySQL installed with Zope and Linux.
> I can get Zope, Python, Zserver  and Linux running with the RPM's.
> What I can't seem to be able to do is install the MySQL database connection.
> I have read the  docs from alanprog who says thatI must use the source version of Zope.  I have tried to install the source without any success.  I reloaded linux and tried the source Zope.  I get several errors about Z2.py and a lack of permission.  After installing Python devel most errrors went away.  Is there some docs on source installation?
>

If you unzip the source installation, there is a doc directory that contains various text files with instructions.

Let me proffer some simple instructions.  I will have to make some assumptions, so feel free to ask questions.

check your python version.  It must be 1.5.2 or better.  I can't seem to find a way to make python print a version number, so the best way to figure out the version is to check your rpm listing (rpm -aq)

Uninstall the RPM.
unzip the source distribution
change directory in zope-2.1.1-src
assuming you only want to run in Zserver (easiest to start with), type 'python wo_pcgi.py' at the prompt.  Make sure that python and your c compiler are in your path (a redhat system only needs /usr/bin in your path)
Set the super user password to something you can remember ('python zpasswd.py -u superuser -p <a_new_password> access')
Once it is done compiling, run the start script by typing './start'

If any of these stages fail, send the error listing to me (or the list).

Installing the MySQL adaptor is a relatively painless procedure, provided you have mysql 3.22.25 or less.  The current version is 3.22.27, and it breaks the adaptor.  Type mysql and check the version.  If you have a version lower than 3.22.26, you are fine.

unzip the ZMySQLDA product in your zope directory.  It will put a bunch of stuff in the <zope>/lib/python/Products directory

apply the ZMySQLDA.patch file to the product (Instructions are at the top of the ZMySQLDA.patch file)
cd to lib/python/Products/ZMySQLDA/src
type: make -f Makefile.pre.in boot
type: make
copy the MySQLModule.so up on directory to the ZMySQLDA directory ('cp MySQLModule.so ..')
test the module by running python at the prompt and typing 'import MySQL' and make sure it gives no errors.
Restart zope.

MySQL DB connections should now be available.

--sam