Visokio website     Downloads     Video tutorials     KnowledgeBase  
MySQL over SSH on a Mac - Visokio Forums
MySQL over SSH on a Mac
  • aknotts     aknotts May 17, 2011 5:42AM
    Does anyone know the best way to connect to a MySQL database over SSH using Omniscope 2.6b620+ on a Mac?

    Thanks

    Andy
  • 4 Comments
  •     steve May 18, 2011 1:38AM
    Sure. Let's say that these are your SSH connection details which allow you to log into the SSH server and access the remote network:

    SSH server (external IP address or host name): 123.45.67.89
    Username: "TheSshUser"
    Password: "TheSshPassword"

    And these are your MySQL database connection details:

    Database server (internal IP address within the remote network): 192.168.0.20
    MySQL port (default for MySQL): 3306
    Database name: "MyDatabase"
    username: "TheDatabaseUser"
    password: "TheDatabasePassword"

    INSTRUCTIONS

    1. Open Terminal in order to establish the SSH connection. This applies to UNIX environments such as Mac; on Windows, use the Putty SSH client instead.

    2. Enter the following command, customised as necessary:
    ssh TheSshUser@123.45.67.89 -L 3306:192.168.0.20:3306

    3. Enter your SSH password "TheSshPassword" when prompted. (You now have a secure SSH tunnel to the remote network, and have mapped localhost:3306 to 192.168.0.20:3306).

    4. Start Omniscope, and choose File > Connect to database. I'm assuming you're using 2.6; if using 2.5, you'll need to enter more complex JDBC connection details - let me know.

    5. Enter the following in the database connection form:
    Select database: "MySQL"
    Host: "localhost"
    Port: 3306
    Database name: "MyDatabase"
    Username: "TheDatabaseUser"
    Password: "TheDatabasePassword"
    Click "Connect" - you should see the list of tables appear. This proves the SSH tunnel is working.

    6. Choose a table and click OK.
  • aknotts     aknotts May 19, 2011 12:12PM
    Steve

    Many thanks. This worked perfectly.

    Andy
  •     steve May 30, 2012 2:02PM
    This is now possible directly in Omniscope 2.8, available shortly to alpha partners.
    http://forums.visokio.com/discussion/1572/scpsftp-and-ssh-port-forwarding-2.8

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Tagged