MYSQL setup problems

Hi,

I’m trying to setup persistence by using a mariadb database. The database is on a remote raspberry server.
I have been solving one problem after the other and now I can state the following:

For testing (and also my personal understanding) I have removed the firewall from the database server and installed mysql-client on the openhab server. Now I can connect from the openhab server via

mysql -u username -h ip-adress-db-server -p

to the mysql database server on the remote server.

However Openhab is still giving me errors:

java.io.FileNotFoundException: /var/lib/openhab2/cache/org.eclipse.osgi/219/0/.cp/lib/mysql-connector-java-8.0.13.jar (No such file or directory)

My first question would be:
What addon should I install via paper UI:

MSQL Persistence
JDBC Persistence MYSQL
JDBC Persistence MariaDB

Second question
If I have the correct addon(currently MSQL Persistence), how do I solve my problem?

Grts,
Mario

Hi me again,

I found the jar-file but its is not in .

…/219/0/.cp/lib/

but in

…/220/0/.cp/lib/

I guess there must be a way to redirect the system? Or should I just rename the directory?

Hi again me again,

Problem seems to have been solved!

The only thing I did was copying the 220 folder intirely to a 219 folder.
(I didn’t risk to rename it)

Errors are gone and database is being populated correctly.

Not sure if this should be reported as a “bug” or maybe I did something wrong during setup. If someone needs more info about my setup than don’t hesitate to ask.

If someone sees possible (security) issues with what I did please inform me…preferably with the correct advise!:slight_smile:

Grts,
Mario