I installed the persistance layer using mysql like described like here https://community.openhab.org/t/how-to-setup-mysql-persistence-in-a-few-minutes-step-by-step/100965
If i connect to the database and call
MariaDB [OpenHAB]> show Tables from OpenHAB;
+-------------------+
| Tables_in_OpenHAB |
+-------------------+
| items |
+-------------------+
1 row in set (0.002 sec)
MariaDB [OpenHAB]>
I get this.
If I call a select to the items the table is empty
How can I check what happends?
rlkoshak
(Rich Koshak)
February 23, 2024, 6:44pm
2
First place is openhab.log.
There are no entries about mysql or jdbc
rlkoshak
(Rich Koshak)
February 23, 2024, 11:21pm
4
No errors when OH first starts?
What is the contents of the .persist file, or did you configure the strategy in the UI? Note that the example on the link above is for illustration purposes and you are expected to modify it for your setup.
Do you see a line in the log saying that it has in fact loaded the .persist file (it should say something like “Loaded model jdbc.persist”)?
apella12
(Bob Eckhoff)
February 24, 2024, 1:11am
5
things might have changed, but do you have a jbdc.cfg file under conf/services? With something like this;
url=jdbc:mysql://127.0.0.1:3306/rpi4data?serverTimezone=America/New_York
user=openhab
waitTimeout=91000
I see that in the step by step, but I believe mysql.cfg is no longer used. It is jdbc.cfg now