You are not logged in Log in Join
You are here: Home » Download Zope Products » Zope Database Adapters » Z MySQL Database Adapter

Log in
Name

Password

 
 

Folder icon Z MySQL Database Adapter

Z MySQL DA

THIS IS AN UNSUPPORTED PRODUCT

This is the Z MySQL database adapter product for the Z Object Publishing Environment.

*** IMPORTANT ***

This product is distributed as a NON-BINARY release!

This product requires compiled Python extensions that are NOT included as binaries with this release. You must build or install the required extensions using the instructions below before the product will work properly!

Installation

The Z MySQL database adapter product requires that the Python MySQLmodule extension be installed.

Note that this is a different extension than the older "mySQLmodule" extension - the older "mySQLmodule" extension will NOT WORK with this product!

The source files and associated files required to build the required MySQLmodule are included in this product distribution. Follow the steps below to build the extension on UNIX platforms. Note that the included files do not support building on win32 platforms at this time.

  • Ensure that you have Python 1.5 or greater installed.
  • Ensure that you have MySQL installed on your machine, INCLUDING THE FILES AND LIBRARIES NECESSARY TO DEVELOP MySQL APPLICATIONS. This is generally only an issue if you used an RPM installation of MySQL, which may not have installed the various include files and libraries required to compile the MySQL extension. If you do not have the developer files installed, you will need to download them from the MySQL web site at http://www.tcx.se. Please contact the MySQL maintainers with all questions pertaining to the use or installation of development files.
  • If you have a previously-installed version of ZmySQLDA, MOVE OR REMOVE THE OLD lib/python/Products/ZmySQLDA DIRECTORY. This new version will allow you to continue to use existing database connection objects created with the old version of ZmySQLDA.
  • Ensure that you have extracted the ZMySQLDA product distribution in your top-level Zope directory. This should have created a subdirectory named lib/python/Products/ZMySQLDA containing the product files as well as this README file.
  • Build the extension.

    Change to the /src directory of your ZSolidDA product directory and issue the following commands:

              make -f Makefile.pre.in boot
              make
    

    Note that if the Python interpreter that will be used to run Zope is not run with the command python, then you must supply the command used to run Python as an option on the first make command. For example, if you run Python with the command python1.5.1, then use:

              make -f Makefile.pre.in boot PYTHON=python1.5.1
    

    This should create the file MySQLmodule.so in your src directory. This file is a dynamically-linked library. Some versions of Unix (e.g. HP/UX) use a different suffix for dynamically-linked libraries. If errors occur when trying to build the extension, you may need to modify the Setup file to ensure that the correct MySQL include and lib directory options are being passed to the compiler.

    Next, start Python and type "import MySQL", to make sure you can import the module without problems. If Python is unable to import the module, you may need to try rebuilding the module, changing the the switch "-lm" to "-lgcc" in the Setup file.

    Finally, copy the output file MySQLmodule.so up one directory into your ZMySQLDA product directory and restart your Zope installation to complete the product installation.

 Title   Type   Size   Modified   Status 
 1.1.3 Edit object Software Release   2000-02-11 published