0

I wish to connect to a database server through my local machine at work, but I do not have direct access to the database server (due to security reasons). The database server is accessible through another intermediary server which I can connect to.

I understand I can connect to the database if I run my script on the intermediary server, but is there any way through which I can connect to the database server directly through my local machine?

I am trying to do this in a Python script as I wish to read the data into a pandas dataframe (I can do this part once I can set up the connection).

Prashant
  • 316
  • 3
  • 11

1 Answers1

0

If you have SSH access to that intermediary server you can connect via an SSH tunnel. This post describes how to do that: Enable Python to Connect to MySQL via SSH Tunnelling

dmitrybelyakov
  • 3,709
  • 2
  • 22
  • 26