[英]Openshift Connect To MySQL From Local Java Application
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. 我在openshift上使用了可扩展的应用程序,并且试图从本地应用程序访问其数据库,但无法建立连接。 I need to access my MySql 5.5 database.
我需要访问MySql 5.5数据库。
IDE: Netbeans 7.4 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.
使用Openshift中的JBoss应用程序连接它没有任何麻烦。 Any help would be much appreciated.
任何帮助将非常感激。 Sorry for the incomplete info.
抱歉,信息不完整。 I am new here in SOF.
我是SOF新手。
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
. 如果您安装了
rhc
客户端(如果没有,请参见《 客户端工具安装指南》 ),可以通过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 . 使用
localhost
作为它告诉您的主机和端口号,以及应用程序页面提供的用户名和密码。
Note this will only work when running locally, and the the rhc
command will have to be running as well 注意这仅在本地运行时有效,并且
rhc
命令也必须运行
See also 10.13. 另请参见10.13。 Port Forwarding
转发端口
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.