Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the hybris database to MySQL

Tags:

mysql

hybris

I just finished training on hybris as core developer. I've done all the trails and have a project coming soon, but now I would like to tweak the system a little bit to know more about it. My is that I would like to change the database to MySQL but when I do change the settings on hybris platform on these files project.properties and local.properties.

But the problem is that it gives me an exception when I try to run the hybris server again, which is something like this:

console output

like image 836
Aph1ka Avatar asked Nov 28 '14 12:11

Aph1ka


2 Answers

If you want to connect to MySQLyou just have to change configuration in hybris/config/local.properties.

db.url=jdbc:mysql://localhost/hybris
db.driver=com.mysql.jdbc.Driver
db.username=anything but not "root"
db.password=
mysql.allow.fractional.seconds=true (if you're using MySQL 5.6.4 or later)

Since hybris Commerce Suite version 5.0.2, MySQL connector is not shipped with the hybris Commerce Suite . Please download the file and put it in the folder ${HYBRIS_BIN_DIR}/platform/lib/dbdriver


v6 Update

Now mysql.allow.fractional.seconds=true is already present in project.properties of platform.

Also to avoid locks you can use add in mysql configs :

transaction_isolation=READ-COMMITTED
innodb_autoinc_lock_mode = 2
innodb_locks_unsafe_for_binlog=1 

  • Reference v5 : https://wiki.hybris.com/display/release5/MySQL
  • Reference v6 : https://help.hybris.com/6.5.0/hcd/f691bdde96354baaa03ff0e33becf515.html
like image 152
alain.janinm Avatar answered Sep 29 '22 23:09

alain.janinm


Don't forget to build the server using "ant all". Without building the server, the configuration is not applied.

like image 43
Johannes von Zmuda Avatar answered Sep 29 '22 23:09

Johannes von Zmuda