I'm working on a Java project (based on Spring Boot 2.6.x) using IntelliJ Community Edition and JPA Buddy. I want to use JPA Buddy for entity utility and Liquibase integration.
The production DB (MySQL 5.7) is reachable only by ssh tunnel.
Is there a way to configure a DB connection using ssh tunnel? How can I generate a changeLog from the production DB?
Thanks! Miky
CodePudding user response:
As you speak about the PROD database - of course, a better option is to make backup/restore local copy and play with it. But regarding the first part of your question you can use ssh port forwarding
e.g.:
ssh -R 13306:0.0.0.0:3306 user@server -N
# 13306 your machine local port
# 3306 server remote port
and connect to remote MySQL server from your IntelliJ to localhost:13306