The database to use and its connection parameters are specified in a .properties file, e.g., db.properties. The properties file can be placed in the ramadda home directory. To define the database just uncomment the appropriate ramadda.db properties in repository.properties, e.g.:
ramadda.db=derby #ramadda.db=mysql #ramadda.db=postgres #ramadda.db=h2And then specify the jdbc url and the login credentials. The URLS can be of the form:
jdbc:<db type>://<hostname>/<database name> jdbc:<db type>:<database name> jdbc:<db type>://<hostname>/<database name> jdbc:<db type>://<hostname>:port/<database name>If you are running the database on the same machine as RAMADDA the hostname can be "localhost". In the below examples we assume a database called "repository".
ramadda.db=mysql ramadda.db.mysql.url=jdbc:mysql://localhost:3306/repository?zeroDateTimeBehavior=convertToNull ramadda.db.mysql.user=the database user ramadda.db.mysql.password=the database password
ramadda.db=postgres #note: the jdbc url uses "postgresql" as the database type ramadda.db.postgres.url=jdbc:postgresql://localhost/repository ramadda.db.postgres.user=the database user ramadda.db.postgres.password=the database password
ramadda.db=h2 ramadda.db.h2.url=jdbc:h2:%repositorydir%/h2db ramadda.db.h2.user= ramadda.db.h2.password=