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:
[mysqld] default-character-set=utf8 |
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 |
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON swamp.* TO 'swamp'@'%' IDENTIFIED BY 'swamppwd', 'swamp'@'localhost' IDENTIFIED BY 'swamppwd'; |
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; |
Since the created user has no privilege to create new databases, we need to create the SWAMP database:
CREATE DATABASE IF NOT EXISTS swamp; quit; |
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; |
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.