September 9, 2015

Connecting Remotly to Open Shift via mysql workbench

Connecting Remotly to Open Shift via mysql workbench

1. Connect to Server using the following command from command prompt

$ rhc ssh primefaces

Results:
Connecting to 556d735ee0b8cd6557000004@primefaces-sawalha.rhcloud.com ...

    *********************************************************************

    You are accessing a service that is for use only by authorized users.
    If you do not have authorization, discontinue use at once.
    Any use of the services is subject to the applicable terms of the
    agreement which can be found at:
    https://www.openshift.com/legal

    *********************************************************************

    Welcome to OpenShift shell

    This shell will assist you in managing OpenShift applications.

    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!
    Shell access is quite powerful and it is possible for you to
    accidentally damage your application.  Proceed with care!
    If worse comes to worst, destroy your application with "rhc app delete"
    and recreate it
    !!! IMPORTANT !!! IMPORTANT !!! IMPORTANT !!!

    Type "help" for more info.

2. Get the MySQL parameters using the following command:

> export | grep mysql

Results:
declare -x LD_LIBRARY_PATH="/opt/rh/mysql55/root/usr/lib64:"
declare -x MANPATH="/opt/rh/mysql55/root/usr/share/man::"
declare -x OPENSHIFT_MYSQL_DB_SOCKET="/var/lib/openshift/556d735ee0b8cd6557000004/mysql//socket/mysql.sock"
declare -x OPENSHIFT_MYSQL_DB_URL="mysql://mysql_username:mysql_password@127.7.235.2:3306/"
declare -x OPENSHIFT_MYSQL_DIR="/var/lib/openshift/556d735ee0b8cd6557000004/mysql/"
declare -x OPENSHIFT_MYSQL_IDENT="redhat:mysql:5.5:0.2.20"
declare -x OPENSHIFT_MYSQL_LD_LIBRARY_PATH_ELEMENT="/opt/rh/mysql55/root/usr/lib64"

3. Copy the following:


SSH Hostname: primefaces-sawalha.rhcloud.com
SSH Username: 556d735ee0b8cd6557000004
MySQL username and password

4. Open MySQL workbench and create new connection




Read also...

Using FileZilla and SFTP on Windows with OpenShift

Create Connection to server using CyberDuck

No comments: