本文介绍了Openshift从本地Java应用程序连接到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在openshift上使用可扩展的应用程序,我试图从本地应用程序访问其数据库,但我在设置连接时遇到问题。我需要访问我的MySql 5.5数据库。

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

IDE: Netbeans 7.4

我使用连接的环境变量值。我没有麻烦连接到它使用我的JBoss应用程序在Openshift。任何帮助将不胜感激。对不完整的信息。

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.

推荐答案

如果您有 rhc 客户端安装指南(请参阅。

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.

注意这只会在本地运行时工作,而 rhc 命令也必须同时运行

另请参见

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

这篇关于Openshift从本地Java应用程序连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:37
查看更多