IntelliJ 和 Jpa Buddy - SSH 隧道数据库连接
我正在使用 IntelliJ Community Edition 和 JPA Buddy 开发一个 Java 项目(基于 Spring Boot 2.6.x)。我想使用 JPA Buddy 进行实体实用程序和 Liquibase 集成。
生产数据库(MySQL 5.7)只能通过 ssh 隧道访问。
有没有办法使用 ssh 隧道配置数据库连接?如何从生产数据库生成变更日志?
谢谢! 米奇
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

当您谈到 PROD 数据库时 - 当然,更好的选择是制作备份/恢复本地副本并使用它。但是关于问题的第一部分,您可以使用 ssh 端口转发 例如:
并从 IntelliJ 连接到远程 MySQL 服务器到 localhost:13306
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.:and connect to remote MySQL server from your IntelliJ to
localhost:13306