Using RDBMS storage in oxd#
oxd can be configured with any RDBMS for saving data in own persistence. The RDMS configuration in oxd is same for all relational database.
Relational database configuration in oxd#
Follow below steps to use Mysql or Postgres or any other relational database as storage in oxd-server.
-
Copy the database driver jar file in
/opt/oxd-server/libdirectory of installed oxd-server. For exmaple to useMysqldatabase as storage in oxd addmysql-connector-<version>.jarin/opt/oxd-server/lib. -
Set following fields in
/opt/oxd-server/conf/oxd-server.ymlfile of installed oxd-server:- storage set this field
jdbcto configure any relational database to oxd.
storage_configuration Field Descriptions#
-
driver set driver class name of the choosen database. Example
com.mysql.jdbc.Driveris the driver class forMysqldatabase. -
jdbcUrl set jdbc url of the database
-
username set database username
-
password set database password
Mysql storage configuration sample:
``` storage: jdbc storage_configuration driver: com.mysql.jdbc.Driver jdbcUrl: jdbc:mysql://<hostname>:3306/<database_name> username: oxd_username password: oxd_password ```Postgres storage configuration sample:
``` storage: jdbc storage_configuration driver: org.postgresql.Driver jdbcUrl: jdbc:postgresql://<hostname>:5432/<database_name> username: oxd_username password: oxd_password ```- Restart
oxd-server. After the server is restarted it will use configured database as storage.
- storage set this field