Connecting to a Remote Database

by author Geoff St. Pierre on March 3rd 2017

It's not complicated to connect to a database; here's how!


  • A database management application. I will use Sequel Pro in this post.
  • Set up a site on
    • Add your ssh-key to your account settings.


Open up Sequel Pro and click the + in the bottom left corner to create a new connection. You will be prompted for connection settings. At the top there are three tabs. Each type of connection prompts for different settings. Select the ssh tab for a connection.


Let's break down the rest of the settings.

  • Name:
    • This can be anything that describes the database you are connecting to. I usually stick to the format: Example Site - Test.
  • MySQL Host:
    • This will literally be the string database.internal
  • Username:
    • Literally user
  • Password:
    • leave empty
  • Database:
    • Literally main
  • Port:
    • leave empty

The rest of the settings can easily be obtained through the ssh connection string provided by platform. To get the string, login to, choose your project, hover over the Access site link, and copy the SSH ACCESS string to your clipboard.

  • SSH Host:
    • The part of the string after the @
  • SSH User:
    • This is the part of the string before the @ it consists of the platform site ID and the environment.
  • Leave the rest of the settings blank but make sure the Connect using SSL box is checked.

Sequel Pro should pick up your public key from your computer but if it can't you can browse to your public key to explicitly point to it (usually in ~/.ssh/).

That's it! Click Test Connection if it connects hit Save changes then Connect.


You now have a new favorite in your Sequel Pro sidebar that you can use to connect to your environment anytime you need it.

Read some other awesome Tandem adventures

authorMike Pirog, May 20th 2017

Learn how to use composer-based workflows with your Pantheon site on Kalabox so you can dev like it's 2017.

authorGeoff St. Pierre, May 10th 2017

How to work with Postgres Databases on

authorGeoff St. Pierre, March 3rd 2017

Connecting to a remote Database on is simple (when you know how)!