beta.blog

hybris: configure a MySQL database

by on Nov.10, 2016, under Programming

If you would like to configure hybris to use a MySQL database, you can do so by configuring your property file (e.g. local.properties) accordingly. By default, hybris is configured to use HSQLDB (Hyper Structured Query Language Database), a relational database management system available and written in Java.

For this example just open your local.properties file located under hybris/config/ and change the following key value pairs:

db.url=jdbc:mysql://localhost/dbName
db.driver=com.mysql.jdbc.Driver
db.username=dbuser
db.password=dbpassword

For security reasons, you should never connect to your database using the root user (even though it’s ‘just’ the MySQL root user). This is due to the fact that MySQL FILE instructions may modify your file system and can be abused e.g. to inject harmful code.

In MySQL server version 5.6 or above you may also store microseconds in datetime columns. If your application requires you to store timestamps at such a high precision you can enable that by setting the following property to true as well:

mysql.allow.fractional.seconds=true
:,

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!