[SOLVED] Cant get running jdbc mysql persistence

Hi,

trying to setup jdbc mysql persistence for some days now.

Problem:
openhab automatically created a database named openhab with 1 table and 2 columns: itemId, itemname. Thats all! no data records, no messages in log file, nothing.

I installed jdbc mysql persistence via paperui. in runtime.cfg I set default persistence to jdbc. jdbc config

url=jdbc:mysql://127.0.0.1:3306/openhab
user=xxx
password=xxx

my default.persist file

Strategies {
    default = everyChange
}

Items {
    * : strategy = everyChange
}

only line in openhab.log 2018-05-30 11:32:11.112 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource

any idea what I’m doing wrong?

jdbc.persist

thought that the filename is not important and could be everything, similar like e.g. in items file. readme in the folder says: Your persistence configuration goes here. All persistence files have to have the ".persist" file extension and must follow a special syntax.

however, of course I’ll check this out later

You can have multiple persistence services running in parallel, so you would differentiate based on the name (mapdb.persist, influxdb.persist & jdbc.persist). The proper name is mandatory for the service configuration to be parsed.

The readme in the folder is generic. More info can be found on the docs section of the website.

you’re right (of course). changed and it works like a charm. thx a lot. I believe, why ever, I wouldnt never come behind this issue alone.

1 Like