将hybris数据库更改为MySQL

时间:2014-11-28 12:42:31

标签: mysql hybris

我刚刚完成了关于hybris培训的核心开发人员。我已经完成了所有的工作,很快就会有一个项目,但现在我想稍微调整一下系统以了解它。我的意思是我想将数据库更改为MySQL,但是当我在这些文件project.properties和local.properties上更改hybris平台上的设置时。

但问题是,当我再次尝试运行hybris服务器时,它给了我一个例外,这是这样的:

console output

2 个答案:

答案 0 :(得分:8)

如果您想连接到MySQL,只需更改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)

自hybris Commerce Suite 5.0.2版以来,hybris Commerce Suite未附带MySQL连接器。请下载file并将其放在$ {HYBRIS_BIN_DIR} / platform / lib / dbdriver

文件夹中

v6更新

现在mysql.allow.fractional.seconds=true已存在于platform.properties of platform中。

另外,为了避免锁定,您可以在mysql配置中使用add:

transaction_isolation=READ-COMMITTED
innodb_autoinc_lock_mode = 2
innodb_locks_unsafe_for_binlog=1 

答案 1 :(得分:1)

不要忘记使用“ant all”构建服务器。如果不构建服务器,则不会应用配置。