简体   繁体   English

将hybris数据库更改为MySQL

[英]Changing the hybris database to MySQL

I just finished training on hybris as core developer. 我刚刚完成了关于hybris作为核心开发人员的培训。 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. 我的意思是我想将数据库更改为MySQL,但是当我在这些文件project.properties和local.properties上更改hybris平台上的设置时。

But the problem is that it gives me an exception when I try to run the hybris server again, which is something like this: 但问题是当我尝试再次运行hybris服务器时,它给了我一个例外,这是这样的:

控制台输出

If you want to connect to MySQLyou just have to change configuration in hybris/config/local.properties . 如果你想连接到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)

Since hybris Commerce Suite version 5.0.2, MySQL connector is not shipped with the hybris Commerce Suite . 由于hybris Commerce Suite版本5.0.2,hybris Commerce Suite不附带MySQL连接器。 Please download the file and put it in the folder ${HYBRIS_BIN_DIR}/platform/lib/dbdriver 请下载该文件并将其放在$ {HYBRIS_BIN_DIR} / platform / lib / dbdriver文件夹中


v6 Update v6更新

Now mysql.allow.fractional.seconds=true is already present in project.properties of platform. 现在, mysql.allow.fractional.seconds=true已存在于platform.properties平台中。

Also to avoid locks you can use add in mysql configs : 另外要避免锁定,你可以在mysql配置中使用add:

transaction_isolation=READ-COMMITTED
innodb_autoinc_lock_mode = 2
innodb_locks_unsafe_for_binlog=1 

Don't forget to build the server using "ant all". 不要忘记使用“ant all”构建服务器。 Without building the server, the configuration is not applied. 如果不构建服务器,则不会应用配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM