简体   繁体   中英

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. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM