Openshift Connect To MySQL From Local Java Application

僤鯓⒐⒋嵵緔 提交于 2019-12-24 22:32:22

问题


I'm using a scalable app on openshift and I'm trying to access its database from a local app but I am having trouble setting up the connection. I need to access my MySql 5.5 database.

IDE: Netbeans 7.4

I am using the environment variable values for the connection. I have no trouble connecting to it using my JBoss app in Openshift. Any help would be much appreciated. Sorry for the incomplete info. I am new here in SOF.


回答1:


If you have the rhc client installed (see Client Tools Installation Guide if not), you can have it port forward to the server via rhc port-froward. Use localhost as the Host and port number it tells you, with the user name and password supplied from the application page.

Note this will only work when running locally, and the the rhc command will have to be running as well
See also 10.13. Port Forwarding



来源:https://stackoverflow.com/questions/24982398/openshift-connect-to-mysql-from-local-java-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!