Troubleshooting Database Connections
Having trouble connecting Embeddable to your database? Below are common issues and fixes.
-
Incorrect Credentials
- Double-check your username, password, and database name.
- Make sure the host and port match your database configuration.
- Sometimes, if your database password contains special characters such as backslashes (
\
), you may need to escape them properly. For instance, a password likeJ\c\X
should be written asJ\\c\\X
.
-
Firewall or Network Restrictions
- Ensure your database server allows incoming connections from Embeddable’s IP addresses.
- If you’re hosting on-prem or behind a VPN, confirm that Embeddable can reach the server.
-
SSL or TLS Requirements
- Some databases require SSL. Confirm that you’ve enabled
ssl: true
(or relevant SSL parameters) in your credentials if needed. - Check your certificates and ensure the SSL configuration matches your DB server’s setup.
- Some databases require SSL. Confirm that you’ve enabled
-
Version Mismatch
- Make sure your database version is supported by Cube (opens in a new tab).
- Older versions of certain databases may have quirks or missing features that affect connecting to Embeddable.
-
Missing Tables or Schemas
- If a query returns “table not found,” confirm that
sql_table
orsql
references the correct schema/table names. - Check that the user you've used when connecting has the right permissions to access those tables.
- If a query returns “table not found,” confirm that
-
Data Source Configuration
- In your model file (
<name>.cube.yml
), verify thedata_source
field references the correct connection in your settings (omitting thedata_source
field defaults to a demo connection nameddefault
). - If you have multiple connections, confirm you’re using the right one.
- In your model file (
-
Security Context Settings
- If row-level security is blocking access, ensure your securityContext is correct.
- Review any
WHERE
clauses referencingCOMPILE_CONTEXT.securityContext
to confirm values are passed properly.
-
Connection URL Format
- For databases like Redshift, Snowflake, or MS SQL, small typos in the URL or host can cause “connection refused” errors.
- Compare your connection string against sample configurations in our docs.
Still Stuck?
- Contact Us: We’re here to help troubleshoot more complex connection issues.