AppDynamics for Databases

2.9.x Documentation

On this page:

If you do not have direct network connectivity from your client to your MySQL database e.g. if a firewall is blocking port communication, then an SSH tunnel is often the best and easiest solution.

An SSH tunnel can be set up using PuTTY (freely downloadable from the official PuTTY site) with the MySQL port (e.g. 3306 by default) forwarded. Once a tunnel has been set up a port on your local machine will be listening and forwarding to your remote server's port, which means you can effectively connect to the remote server's MySQL database as though it were running on your local box.

Set up the Tunnel

  1. Create a session in PuTTY - Insert the hostname or IP address of the machine running MySQL.
  2. Select the Tunnels tab in the SSH section.

    In the Source port text box enter 3306 (or any other unused port that you would like to connect your client to). This is the port PuTTY will listen on on your local machine. It can be any standard Windows-permitted port. In the Destination field below Source port enter 127.0.0.1:3306. This means, from the server, forward the connection to IP 127.0.0.1 port 3306. If your MySQL Server listens on a non-standard port, or on a specific network interface then you will need to insert these details instead on the form IP:Port.

  3. Click Add and then Open the connection.

Note: When you want to set up your collector to connect to this remote MySQL Server you need to specify the hostname/IP address as localhost, and the port number as the one you configured as the Source Port in the tunnel.