Edit online

How to Set Up the Database

Supported databases:
  • MySQL 8.0
  • PostgreSQL 11
  • PostgreSQL 12

MySQL

To connect Oxygen Feedback Enterprise to the MySQL database, follow these steps:
  1. Create a database user that will be used by Oxygen Feedback Enterprise to connect to the database. For example, feedback_db_user:
    CREATE USER 'feedback_db_user'@'localhost' IDENTIFIED BY 'password';

    This creates a user that can connect from the localhost. For more details, see: https://dev.mysql.com/doc/refman/8.0/en/create-user.html.

  2. Create the database where Oxygen Feedback Enterprise will store its data. For example, feedback_db:
    CREATE DATABASE feedback_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    The database must have a character set of UTF8. For more details, see: https://dev.mysql.com/doc/refman/8.0/en/create-database.html.

  3. The user needs to have permission to connect to the database, create and populate the tables, etc. You can provide these permissions with the following command:
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, 
    CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE ON feedback_db.* 
    TO 'feedback_db_user'@'localhost';
    flush privileges;

    For more details, see: https://dev.mysql.com/doc/refman/8.0/en/grant.html.

  4. Copy the MySQL JDBC driver:
    1. Go to https://dev.mysql.com/downloads/connector/j/8.0.html.
    2. For Select Operating System, chooses Platform Independent.
    3. Download the connector.
    4. Extract the contents from the downloaded MySQL connector JAR file to the installation directory. For example:
      $OXYGEN_FEEDBACK_INSTALL_DIR/oxygen-feedback-1.3/lib 
      Note: Only the MySQL connector JAR file should be copied to the directory mentioned above, and not the entire archive content.
  5. Configure Oxygen Feedback Enterprise to connect to the database:
    1. Go to /config and create a file named feedback-database.properties.
    2. Edit the file and update it with your configuration. An example is provided in the feedback-database-mysql.properties file. It should look like this:
      # The database management system type. For example MySQL or PostgreSQL.
      feedback.database.type = mysql
      # The database URL in format: jdbc:mysql://<hostname>:<port>/<database>
      # For example: jdbc:mysql://localhost:3306/feedback_db
      feedback.datasource.url=jdbc:mysql://localhost:3306/feedback_db
      # The username to access the database
      feedback.datasource.username=feedback_db_user
      # The password to access the database
      feedback.datasource.password=password

PostgreSQL

To connect Oxygen Feedback Enterprise to the PostgreSQL database, follow these steps:
  1. Create a database user that will be used by Oxygen Feedback Enterprise to connect to the database. For example, feedback_db_user:
    CREATE USER feedback_db_user WITH PASSWORD 'password';

    For more details, see: https://www.postgresql.org/docs/12/sql-createuser.html.

  2. Create the database where Oxygen Feedback Enterprise will store its data. For example, feedback_db:
    CREATE DATABASE feedback_db ENCODING='UTF8' LC_COLLATE='C' LC_CTYPE='C' TEMPLATE='template0';

    The database must have the encoding set of UTF8. For more details, see: https://www.postgresql.org/docs/12/sql-createdatabase.html.

  3. The user needs to have permission to connect to the database, create and populate the tables, etc. You can provide these permissions with the following command:
    GRANT ALL PRIVILEGES ON DATABASE feedback_db TO feedback_db_user;

    For more details, see: https://www.postgresql.org/docs/12/sql-grant.html.

  4. Configure Oxygen Feedback Enterprise to connect to the database:
    1. Go to /config and create a file named feedback-database.properties.
    2. Edit the file and update it with your configuration. An example is provided in the feedback-database-psql.properties file. It should look like this:
      # The database management system type. For example MySQL or PostgreSQL.
      feedback.database.type = postgresql
      # The database URL in format: jdbc:postgresql://<hostname>:<port>/<database>
      # For example: jdbc:postgresql://localhost:5432/feedback_db
      feedback.datasource.url=jdbc:postgresql://localhost:5432/feedback_db
      # The username to access the database
      feedback.datasource.username=feedback_db_user
      # The password to access the database
      feedback.datasource.password=password