Supported databases
| Database | Authentication | SSH Tunnel | Read-only Mode |
|---|---|---|---|
| PostgreSQL | Connection string or individual credentials | Yes | Yes |
| MySQL | Connection string or individual credentials | Yes | Yes |
| Amazon Redshift | AWS IAM role assumption | No | No |
Connecting a database
Open the Integrations page
Navigate to Integrations in the left sidebar and scroll to the Databases section.
Enter connection details
For PostgreSQL and MySQL, provide either a connection string or individual credentials (host, port, database name, username, password). For Amazon Redshift, provide your cluster details and IAM role ARN. Redshift uses AWS IAM role assumption for secure, credential-free access.
Configure connection options
Optionally enable read-only mode to prevent accidental writes, or SSH tunnel to route the connection through an SSH tunnel for databases behind a firewall.
Read-only mode
When read-only mode is enabled, Vybe enforces read-only transactions on every query to the database. This means:SELECTqueries work normallyINSERT,UPDATE,DELETE, and DDL statements are blocked- The AI cannot modify your data, even if you ask it to
SSH tunnel connections
For databases behind a firewall or in a private network, Vybe supports SSH tunnel connections.Create an SSH key
On the Integrations page, scroll to the SSH Keys section and click Create SSH Key. Vybe generates a public/private key pair.
Add the public key to your server
Copy the public key and add it to the
~/.ssh/authorized_keys file on your SSH bastion host or jump server.Connect the database with SSH
When connecting a database, enable the SSH tunnel option and provide the SSH host, port, username, and the SSH key you created.
Organization-wide access
Connected databases are available to all members of your organization. Once you connect a database, any team member can:- Query it from the AI chat in any app
- Use it as a data source when building apps
- Reference it in saved data queries
Using external databases
Once connected, you can interact with external databases in two ways:Through the AI chat
Ask the AI to query your external database directly during a conversation:Show me the top 10 customers by revenue from our analytics database.
How many orders were placed last month in the production database?The AI identifies which connected database to query, writes the SQL, executes it, and displays the results inline.
From app code
The AI generates server-side code that queries your external databases using Vybe’s helper functions. Each database type has its own helper with parameterized query support.Redshift specifics
Amazon Redshift connections work differently from PostgreSQL and MySQL:- Authentication: Uses AWS IAM role assumption instead of username/password credentials. You provide the IAM role ARN that Vybe assumes to access your cluster.
- No SSH tunnel: Redshift connections do not support SSH tunneling. Ensure your Redshift cluster is accessible from Vybe’s IP range.
- Asynchronous queries: Redshift queries are executed asynchronously. The helper function returns a result object with a status field that you should check before accessing the data.
Troubleshooting
Connection timed out
Connection timed out
Check that your database is accessible from external networks. If it is behind a firewall, use an SSH tunnel connection. Verify that the host, port, and credentials are correct.
SSH tunnel failed
SSH tunnel failed
Confirm that the public key is added to your server’s
authorized_keys file. Verify the SSH host, port, and username. Ensure the SSH server allows tunneling (check AllowTcpForwarding in your SSH config).Permission denied on queries
Permission denied on queries
Your database user may not have access to the tables you are querying. Check the user’s permissions and grant
SELECT access to the relevant schemas and tables.