openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.87k stars 3.58k forks source link

[jdbc] Add support for unix sockets using junixsocket #13681

Open juantxorena opened 1 year ago

juantxorena commented 1 year ago

It would be great to be able to connect to the databases using unix sockets instead of TCP when applicable.

According to this, just adding the junixsocket project to the pom.xml file would be enough, the configuration will be then done with some url connection magic. For MySQL databases, an additional dependency to junixsocket-mysql may be needed, according to this.

When I have time during the weekend I could try and test it, but if somebody who has the development environment set-up already can do it I could simply copy the jar file to wherever is needed and try it with a postgresql DB.

juantxorena commented 1 year ago

If I do a pull request and test it, would it be accepted?