Database Connections

1. What are Database Connections?

The Database Connections feature allows you to securely store and manage the settings needed to connect our application to your various external databases. Once a connection is set up, our application can access data from your sources to provide you with valuable insights and services.

This means you can:

  • Securely save credentials for different databases in one place.
  • Easily manage these connections without needing technical help for every change.
  • Connect to a variety of popular database types.

2. Supported Database Types

You can connect to the following types of databases:

  • MySQL
  • PostgreSQL
  • Google BigQuery
  • Amazon Redshift
  • Snowflake

If you need to connect to a database type not listed here, please contact our support team.

3. Managing Your Connections

You can find the Database Connections management page in [mention where in the application, e.g., "your account settings under 'Integrations'"]. On this page, you'll see a list of all the database connections you've already set up.

For each connection, you'll see its Name and Type. You'll also have options to Edit or Delete it.

A. Adding a New Database Connection

To add a new database, follow these steps:

  1. Click the "Add Connection" button. A form will appear.
  2. Connection Name: Enter a descriptive name for this connection (e.g., "Sales Reporting DB" or "Marketing Analytics Warehouse"). This name is for your reference.
  3. Database Type: Select the type of database you want to connect to from the dropdown list (e.g., MySQL, PostgreSQL).
    • Once you select a type, the form will update to show the specific settings required for that particular database.
  4. Configuration: Fill in the specific details for your database. Common fields include:
    • Host: The address of your database server.
    • Port: The port number your database server listens on.
    • Username: The username for accessing the database.
    • Password: The password for the specified username.
    • Database Name: The name of the specific database you want to connect to on the server.
    • (Note: The exact fields will vary depending on the selected Database Type. Some fields might have helpful tips or placeholder examples.)
  5. SSH Tunnel (Optional): For an extra layer of security, you can connect through an SSH tunnel. If your database requires this or you wish to use it:
    • Check the "Enable SSH Tunneling" box.
    • Additional fields will appear:
      • SSH Host: The address of your SSH server.
      • SSH Port: The port for the SSH connection (usually 22).
      • SSH Username: The username for the SSH server.
      • SSH Password: The password for the SSH user. (Leave blank if using an SSH Private Key).
      • SSH Private Key: The content of your SSH private key file (e.g., id_rsa). (Leave blank if using an SSH Password). You'll need to paste the entire content of the key file here.
      • You typically provide either an SSH Password or an SSH Private Key.
  6. SSL Encryption (Optional): To encrypt the data exchanged between our application and your database:
    • Check the "Enable SSL Encryption" box.
    • Additional fields will appear for you to paste the content of your SSL certificate files:
      • SSL Certificate Authority (CA): Content of your CA certificate file.
      • SSL Client Certificate: Content of your client certificate file.
      • SSL Client Key: Content of your client key file.
  7. Create Connection: Once you've filled in all the necessary details, click the "Create Connection" button.
    • Our system will attempt to test the connection with the details you provided.
    • If the test is successful: The connection will be saved, and you'll be taken back to the list of your connections with a success message. Our system will also try to fetch some basic information about your database structure (like table and column names) to help with other features.
    • If the test fails: You'll see an error message (e.g., "Connection test failed! Please check your details."). Please double-check all your settings, especially usernames, passwords, hostnames, and ports, then try saving again. The connection will not be saved if the initial test fails.

B. Editing an Existing Connection

If you need to update the settings for a database connection (for example, if a password changes):

  1. Find the connection in the list.
  2. Click the "Edit" button next to it.
  3. The same form you used to add the connection will appear, pre-filled with its current settings.
    • Note: For security reasons, existing passwords, SSH private keys, and SSL certificate fields will appear blank. If you are not changing them, you can leave them blank. If you are changing them, enter the new values.
    • Changing the "Database Type" after a connection has been created is generally not recommended. If you need to connect to a different type of database, it's usually better to add a new connection.
  4. Make your changes to the connection details, SSH, or SSL settings.
  5. Click the "Update Connection" button.
    • The system will test the connection with the new settings.
    • If the test is successful: The changes will be saved, and you'll see a success message. If the database type or critical connection details were changed, the system might re-fetch basic schema information.
    • If the test fails: You'll see an error message. The changes you made will still be saved, but the connection might not work correctly until the issues are resolved. Double-check your updated settings.

C. Deleting a Connection

If you no longer need a database connection:

  1. Find the connection in the list.
  2. Click the "Delete" button next to it.
  3. A confirmation message will appear asking, "Are you sure you want to delete this connection? This cannot be undone."
  4. If you are sure, click "OK" (or the confirm button).
  5. The connection will be removed from your list, and any associated stored schema information will also be deleted.

4. Security of Your Connection Details

We understand that database connection details are sensitive.

  • Encryption: Your sensitive information, such as passwords, SSH private keys, and SSL certificate contents, are encrypted before being stored in our system.
  • Secure Access: Only authorized users within your team (typically team owners or administrators with specific permissions) can manage these database connections.
  • Connection Testing: Testing connections helps ensure that you are connecting to the correct database and reduces the risk of errors.

If you have any concerns or questions about the security of your database connections, please contact our support team.

5. Troubleshooting Common Issues

  • "Connection test failed!":
    • Double-check the hostname or IP address of your database server.
    • Verify the port number.
    • Ensure the username and password are correct.
    • Confirm the database name is accurate.
    • If using SSH or SSL, verify all related settings, including host, port, username, password/key, and certificate contents.
    • Check if your database server's firewall is allowing connections from our application's IP addresses (if applicable, our support team can provide these).
  • General Slowness or Timeouts: This could be due to network issues between our application and your database server, or your database server might be under heavy load.

If you continue to experience issues, please don't hesitate to contact our support team for assistance.