# Database Access

Accessing your databases with client software like Sequel Pro (opens new window), Sequel Ace (opens new window) and TablePlus (opens new window) is straight forward with trellis-cli (opens new window):

  • Trellis CLI
  • Manual

Run the following from any directory within your project:

For Sequel Pro (or Sequel Ace):

$ trellis db open --app=sequel-pro production example.com

For TablePlus

$ trellis db open --app=tableplus production example.com

# Vagrant and SSH configs

Regardless of if you're using trellis-cli or doing it manually, Vagrant boxes require some additional configuration since they require an SSH private key.

Since the path of this private key depends on the Vagrant provider (eg: VirtualBox or Parallels) you're using, we recommend making sure that your database GUI app of choice is properly configured to respect your local SSH config (usually in ~/.ssh/config).

Trellis' Vagrant integration automatically adds the necessary configuration to your SSH config for each Vagrant machine.

The main thing to verify is that you can SSH into your Vagrant machine with ssh vagrant@<hostname>. If that works, then your SSH config is setup properly and will make any database access over SSH easier.

# Sequel Ace

In Sequel Ace, you need to set your SSH config and SSH known hosts file, then additionally give the app access to those files and your Vagrant private key.

See this Discourse post (opens new window) for full details on this process.

# TablePlus

For TablePlus and VirtualBox, you need to manually select the private key from .vagrant/machines/default/virtualbox/private_key.

Page authors:

Scott Walkinshaw
Ben Word
Michael W. Delaney
Mike iLL Kilmer
Sponsor us on GitHub to help us grow 🌱