MySQL DB set up
Purpose
The database which comes bundled with PillarOne is mostly useful to test the application or components / models. For operational use of PillarOne, i.e. storing numerous simulation results each of which may contain a couple of hundred thousand of floating point numbers, we recommend using a professional database. This impoves the performance significantly and in multi-user mode also allows additional security.
In the following we describe how to set up MySQL as the back-end for PillarOne. Any other professional database product can be used, as well. Get in touch with us if you want to run it on Oracle, DB2 or whatever.
Because PillarOne uses partitioned tables, MySQL 5.1 or newer is required.
Prerequisities
Riskanalytics (more recent than v0.4) installed.Download the recent version of the community mysql server and install it. The proposed settings during installation are usually fine.
Step by step
- Login to your mysql server
os-shell> mysql --user=root --password=guess
If mysql has not been added to the path during the installation, the installation directory has to be selected before entering the login command.
Hint: If there was a problem setting up the root account during the installation of mysql, the password can be set using mysqladmin -u root password guess - Create a new database instance called 'p1rat'
mysql> create database p1rat;
- Create a new user and set his password
mysql> create user 'p1rat'@'localhost' identified by 'p1rat';
- Enable the new user to access the new database instance
mysql> grant all on table p1rat.* to 'p1rat'@'localhost';
- Grant file access to enable batch uploads
mysql> grant file on *.* to 'p1rat'@'localhost';
- Leave the mysql session
mysql> exit
- Enable partitions and indices on the database to improve runtime
call grails -Dgrails.env=mysql init-database
- Modify the fifth line in RiskAnalytics.cmd in order to use the mysql database. The file is available in the installation sub-directory RiskAnalytics of the RiskAnalytics installation.
Replace
call grails -Dgrails.env=standalone runRiskAnalytics
with
call grails -Dgrails.env=mysql runRiskAnalytics
Further information
- Startup environments are defined in
- RiskAnalytics/grails-app/conf/Config.groovy and
- RiskAnalytics/grails-app/conf/DataSource.groovy
- Any other database product supported by Hibernate may be used.

