Friday, October 5, 2012

How to start the Airavata with MySQL backend

Airavata is running using Apache Derby as the backend database by default. You can use MySQL database instead of default derby database. Following post describe $subject.

1. Create a new user called airavata with password airavata in running MySQL instance.

mysql> CREATE USER 'airavata'@'localhost' IDENTIFIED BY 'airavata';

2. Create a mysql database in your server with required name for user airavata (Assume name is:persistent_data)

mysql> CREATE DATABASE persistent_data;


ON persistent_data.*
TO 'airavata'@'localhost'
IDENTIFIED BY 'airavata';

3. Copy mysql driver jar (-5.1.6.jar) to AIRAVATA_HOME/standalone-server/lib

4. Edit jdbc connection URLs at file that resides in AIRAVATA_HOME/standalone-server/conf. You can achieve this by just uncommenting out parameters under "#configuration for mysql" section and commented-out the default derby configurations (If you followed the above instructions you might not have to change this file.)


5. Go to AIRAVATA_HOME/bin and start the script Now Airavata server will start with MySQL database (in this case persistent_data database).

6. When starting XBaya, it should also point to the same database that we specified when starting Airavata server. In order to do that, copy the same file that you have edited in the 2nd step, to AIRAVATA_HOME/bin folder. Now you are ready to start XBaya. To start XBaya, go to AIRAVATA_HOME/bin folder and run the script Now XBaya will start with the same database that used to start Airavata server.

No comments: