4 min read
database integration allows you to connect your relational database to Gather, allowing you to:
|Database||Dynamic Models||Sync Tables||SSL Authentication||SSH Tunnel|
If your database is publicly accessible over the internet, you can directly connect it to Gather. If your database resides in a VPC and is not publicly accessible, you'll need to connect it to Gather via an SSH Tunnel.
Irrespective of the connection method, Gather will connect to your database via a set of external static IP addresses, which you'll need to whitelist in your firewall. Whitelist the following IPs before continuing:
To directly connect to your publicly accessible database, go to integrations, then:
To connect to your private database, you'll need to have a public accessible bastion running an SSH server. Gather can connect to your database via your bastion server using an SSH tunnel.
On your bastion server, you'll need to create an SSH user for Gather using our public key:
Create a gather group and user:
sudo groupadd gather && sudo useradd -m -g gather gather
Switch to gather:
sudo su - gather
Create an SSH directory and set permissions:
mkdir ~/.ssh && chmod 700 ~/.ssh && cd ~/.ssh
Create authorized_keys and set permissions:
touch authorized_keys && chmod 600 authorized_keys
Add the Gather public key
Using a text editor, paste the public key below, ensuring it's all on one line:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmHhoMgLKG77v0fULT6e3Wz0C+5cUQizz1wDF+K3MXiJsb3pMb3Cmp3sMVl8VsbVdUp8fxgWW57qRg2RcaTzs5tykdUNWkKxpzW/ijKpcOG/Xn036zaP9qs1uqPxE64W0C17o1a77ar7RA+3onNPA+38pcoUfpCsIfENBVuBo74dlO8Af3V5RpZqYKhuDpsH25hpFEUZEAF/a6UZtF4ok8LrWM6CF+5bapVM6Namo6hS6BXmGw7aonVQzR/oTfOvZiOOxJt2sotvjNZW/xMSkDpT8mU76v2LWu0wwcjChFD2G+9Kgkhid6auzK6AqbaqFYoyHvXA7RlL4s9FfF7iZH prod@gather
Go to integrations, then:
SSH Port, and
Behind the scenes, Gather will introspect your database tables to build dynamic models for each table and build the relationships between them. After this has done, you'll then be able to add Views for your models.
More from Integrations