In this article, Olivier Picciotto explains how to configure Convertigo Mashup Composer to use a MySQL database instead of the built in HSQLDB database.
As you know, Convertigo Mashup Composer is based on eXo/JBoss Gatein Open Source portal. See here how to configure Gatein to use MySQL instead of the built in HSQLDB demo database.
The database is used for two purposes :
- The JCR repository to hold all the portal pages widgets and data
- The user database (idm) to store all user identity management.
First we start with the JCR.
- Create a 'mygateindb_portal' database in you mysql server. Beware the '_portal' suffix is mandatory
- Create a 'gateinuser' with a 'gateinpassword' in your mysql database
- Grant all the privileges on 'mygateindb_portal' for 'gateinuser'
- Locate in the installation directory the 'gatein/conf/configuration.properties' file
- Edit the file to replace the JCR connection :
# JCR
gatein.jcr.config.type=local
gatein.jcr.datasource.name=jdbcjcr
gatein.jcr.datasource.dialect=auto
gatein.jcr.datasource.driver=com.mysql.jdbc.Driver
gatein.jcr.datasource.url=jdbc:mysql://localhost:3306/mygateindb_portal
gatein.jcr.datasource.username=gateinuser
gatein.jcr.datasource.password=gateinpassword
- Download the MYSQL jdbc driver from http://dev.mysql.com/downloads/connector/j/ , extract the JDBC connector 'mysql-connector-java-5.1.xx-bin.jar' from the tar/zip file and copy it to your installation's /lib directory in order to have the jdbc connector automatically added to your class path.
Then we configure the IDM :
- Create a 'mygateindb_idm' database in you mysql server.
- Grant all the privileges on 'mygateindb_idm' for 'gateinuser'
- Locate in the installation directory the 'gatein/conf/configuration.properties' file
- Edit the file to replace the IDM connection :
# IDM
gatein.idm.datasource.name=jdbcidm
gatein.idm.datasource.driver=com.mysql.jdbc.Driver
gatein.idm.datasource.url=jdbc:mysql://localhost:3306/mygateindb_idm
gatein.idm.datasource.username=gateinuser
gatein.idm.datasource.password=gateinpassword
Run the gatein portal by using the gatetin.bat run or the gatein.sh run command in your /bin installation's directory. The portal should run and create automatically all the needed tables in the databases you configured.