3.5. Changing the Database

By default Klaros-Testmanagement uses the Apache Derby Database. In production systems, it is strongly recommended to use a full grown database as MySQL or PostgreSQL.

To change the database, Klaros-Testmanagement must be stopped, and the hibernate properties of Klaros-Testmanagement located in <userhome>/.klaros/hibernate.properties must be changed.

The properties depend on the used database.

To use MySQL change the content of the file to:

      
      hibernate.dialect=org.hibernate.dialect.MySQLDialect
      hibernate.connection.driver_class=com.mysql.jdbc.Driver
      hibernate.connection.url=jdbc:mysql://localhost:3306/klaros
      hibernate.connection.username=root
      hibernate.connection.password=root
    

To use PostgreSQL change the content of the file to:

      
      hibernate.connection.driver_class = org.postgresql.Driver
      hibernate.connection.url = jdbc:postgresql://localhost/klaros
      hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
      hibernate.connection.username=root
      hibernate.connection.password=root
      

An exhaustive list of all parameters can be found in the Hibernate Core Manual (see Hibernate Core Manual ).

[Tip]Tip

Klaros-Testmanagement will neither automatically create the database instance ( klaros in the above example) nor the database user (user root with password root) on the database server. Creating a database instance and adding a user is described in the corresponding database manual and will not be covered here. The database user needs permissions to create, drop and alter tables to properly bootstrap the Klaros-Testmanagement database instance.