SWAMP Index Design
* Home
* Documentation
* License
* Demo Server
* Wiki
* Screenshots
* F A Q
* Downloads
* Contact
* Credits

SWAMP is supported by:
SourceForge.net Logo

Set up the MySQL database backend

SWAMP needs a database backend to persist the applications state to disk. This means, each workflows data and status is stored in the db backend.

To make the database handle utf-8 characters properly you have to start it in utf8 mode by adding:

to the /etc/my.cnf file.

Adding a SWAMP MySQL user

The easiest way to get it running is to use the MySQL root user for SWAMP, but we recommend you to create an extra user with restricted access rights due to security reasons. Nevertheless if you are fine with using the root user, you can skip this section, and can proceed with adding the credentials to the config file.

A new database user can be added with several GUI tools, or directly via the mysql shell. Enter the following command to start the shell:

mysql -u root -p
Now, we add the SWAMP user with access rights to the swamp db:
ON swamp.* 
TO 'swamp'@'%' IDENTIFIED BY 'swamppwd', 
'swamp'@'localhost' IDENTIFIED BY 'swamppwd';
This user is now able to log into the mysql server from any host (%) with the configured password.

If you are building SWAMP from source or developing it, the db user needs additional rights to create/delete the swamp db:

GRANT ALL ON *.* TO 'swamp'@'%', 'swamp'@'localhost' WITH GRANT OPTION;
Make sure to revoke these privileges on a production server!

Creating the SWAMP database

Since the created user has no privilege to create new databases, we need to create the SWAMP database:

Now we can import the initial SWAMP tables: (when you build from source this will be done automatically during the "ant torque-init" command)
cd /srv/www/tomcat5/base/webapps/webswamp/WEB-INF/sql; 
mysql -u swamp -p swamp < swamp-schema.sql;
mysql -u swamp -p swamp < swamp-security-schema.sql;
mysql -u swamp -p swamp < turbine-schema.sql; 
mysql -u swamp -p swamp < swamp-scheduledjobs.sql;
mysql -u swamp -p swamp < swamp-security.sql; 

Add the values to the config file

The added SWAMP MySQL user and database name have to be added to the applications config file. If you installed from the RPM, this file resides at: /srv/www/tomcat5/base/webapps/webswamp/WEB-INF/conf/Torque.properties. If you are building from source, you should add the values to your host.properties file before building.

Valid CSS! Valid XHTML 1.0!