Skip to end of metadata
Go to start of metadata

By default eHour uses an embedded database to store data. This works well but it's not guaranteed to recover after an unforeseen shutdown such as a crash or power failure. When you use eHour in a production environment it's recommended to use MySQL or PostgreSQL as your database.

Windows

Icon

On Windows you need to stop the eHour or Tomcat service first before you can edit the configuration file.

Using MySQL

Open the configuration file (conf/ehour.properties) file and set the value of ehour.database to mysql:

ehour.database=mysql

Remove the hashtags (#) and replace the database name and username/password with appropiate values

# for mysql uncomment the following lines (and make sure postgresql lines below are commented out)
ehour.database.driver=com.mysql.jdbc.Driver
ehour.database.url=jdbc:mysql://127.0.0.1:3306/ehour?zeroDateTimeBehavior=convertToNull&useOldAliasMetadataBehavior=true
ehour.database.username=sa
ehour.database.password=sa

Make sure the configuration for postgresql is commented out (prefixed with #)

Create the database tables by following the instructions on database setup for Linux or Windows

Restart eHour

Using Postgresql

Open the conf/ehour.properties file and set the ehour.database to postgresql:

ehour.database=postgresql

Remove the hashmarks (#) and replace the database name and username/password with appropiate values

# for postgresql uncomment the following lines (and make sure mysql lines above are commented out)
ehour.database.driver=org.postgresql.Driver
ehour.database.url=jdbc:postgresql://localhost:5432/ehour
ehour.database.username=sa
ehour.database.password=sa

Make sure the configuration for mysql is commented out (prefixed with #)

Create the database tables by following the instructions on database setup for Linux, Windows setup instructions are not available.

Restart eHour

  • No labels