Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Openshift: How to remote access MySQL?

So I just finished setting up a JBoss application server gear on Openshift and I attached a MySQL and phpmyadmin cartridges. My question is if there is a way to remote access to the database server using an app like MySQL Workbench?

like image 494
Stephen Rodriguez Avatar asked Nov 03 '13 03:11

Stephen Rodriguez


People also ask

How can I remotely access my database?

To set up remote connection to your database, go to Site Tools > Site > MySQL > Remote. After that fill in the IP address or hostname from which you want to connect. You can also add a Label for them. This will allow you to connect to the database server via a remote MySQL client.


1 Answers

You can use rhc port-forward to forward ports from your database to your local machine. Check out the tutorial here. The basic idea of port forwarding in this context is that you can forward ports on your local machine to ones on the gear. So in your case, you would forward some port on your local machine to the port mysql is listening on for connections in your gear. Then you would connect MySQL Workbench to the port on your local machine.

like image 193
Paul Morie Avatar answered Sep 19 '22 22:09

Paul Morie