Wednesday, November 25, 2009

How to setup SQLPASPlugin to authenticate against MYSQL database for Plone

How To Setup SQLPASPlugin to Authenticate Against A MYSQL Database

Site Configuration Details:
Here is some information on the site that I set this up on:

* Plone Version: 3.0
* Zope Version: 2.9.3
* Python Version: 2.4.4

Creation of Database:

SQLPASPlugin may be used to authenticate against any SQL Database for which there is a Zope connector available.

* Install MYSQL for the python in Zope Instance.

Installing SQLPASPlugin :

To connect to the MYSQL database, Plone needs to use a database connector object which needs to be installed. To do this, download the latest version of MySQLdb.

* Extract the Archive MySQLdb , and install it at Plone-3.0/Python-2.4.4/lib/python2.4/MySQL-python-1.2.2

* Place this egg( MySQL_python-1.2.2-py2.4-linux-i686.egg ) in Site Pakages.

* Take the MySQL_python.egg-info egg and place it along with the MySQLdb i.e, at Plone-3.0/Python-2.4.4/lib/python2.4/MySQL-python-1.2.2.

* Place SQLPASPlugin in the Products.

* Place ZMySQLDA in the Products.

Restart Zope.

In the ZMI , in the Addable contents , now we can see the ZMySql Database Connection and ZSQL Method.

Setup a connection to a database which is in mysql, using the ZMySql Database Connection.

Add ZSQL Method and use the database.

Now go to the Portal_Quick Installer and install SQLPASPlugin.
And go to the plone_control_panel.
In the Add-on Product Configuration , a link named SQL Authentication will be present. Click on it .
You will be asked to specify the database for authentication. Check the MySQL database connection to setup the SQL Authenication.

No comments:

Post a Comment