Skip to main content

Database Connections

A connection tells Kvery how to reach one of your databases. Queries always run against a connection, so this is usually the first thing you set up in a new group.

Creating a connection

Open the connections area in your group and add a new connection. You will provide:

  • Driver — one of MySQL, PostgreSQL, or MSSQL. (MariaDB uses the MySQL driver.) See Supported databases.
  • Host — the database server's hostname or IP address.
  • Port — the port the database listens on.
  • Database name — the schema/database to connect to.
  • Username and password — the credentials Kvery should authenticate with.
Use a least-privilege user

Create a dedicated database user for Kvery with only the permissions your queries need. For read-only reporting, grant SELECT only.

Testing a connection

Before saving, use Test connection. Kvery attempts to connect with the details you entered and reports success or the exact error returned by the database. This lets you catch firewall, credential, or host issues immediately.

Securing a connection

SSL

Upload your client SSL certificate to encrypt traffic between Kvery and your database. This is recommended whenever the database is reachable over a public network.

SSH tunnel

If your database is not directly reachable, route the connection through an SSH bastion host. Kvery establishes a tunnel to the bastion and connects to the database through it, allocating a dedicated local tunnel port per connection.

You provide the SSH host, port, and authentication (key or password). Upload your SSH key in the connection's security settings.

Editing and removing connections

You can edit a connection's details at any time; existing queries that use it pick up the change automatically. Removing a connection affects every query bound to it, so review which queries depend on a connection before deleting it.

Connections and permissions

Because connections contain credentials, only members with the appropriate permission can create or edit them. See Members and permissions.