Database Connections

Estimated reading time: 15 minutes

Connecting a database gives clariBI live access to your data. This guide covers setup for each supported database type, security configuration, and sync behavior.

Before You Start

  • You need the database host, port, name, and credentials
  • The database must be reachable from the internet (or you need to whitelist clariBI's IP)
  • A read-only user account is strongly recommended for security

PostgreSQL

The most common database connection type in clariBI.

Connection Details

HostYour database hostname (e.g., db.example.com)
Port5432 (default)
Database NameThe specific database to connect to
UsernameDatabase user (preferably read-only)
PasswordUser's password
SSLEnable for encrypted connections (recommended)

Creating a Read-Only User (Recommended)

-- Connect as admin and create a read-only user
CREATE USER claribi_reader WITH PASSWORD 'your_secure_password';
GRANT CONNECT ON DATABASE your_database TO claribi_reader;
GRANT USAGE ON SCHEMA public TO claribi_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO claribi_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO claribi_reader;
clariBI Settings Integrations tab showing connected OAuth services and Add Data Source button

MySQL

Connection Details

HostYour MySQL hostname
Port3306 (default)
Database NameThe database to connect to
Username / PasswordMySQL credentials
SSLEnable if your server requires it

Read-Only User

CREATE USER 'claribi_reader'@'%' IDENTIFIED BY 'your_secure_password';
GRANT SELECT ON your_database.* TO 'claribi_reader'@'%';
FLUSH PRIVILEGES;

SQLite

For SQLite databases, upload the database file or provide the path to the file on a connected server.

Database FilePath to the .sqlite or .db file

MongoDB

HostMongoDB hostname (e.g., cluster.mongodb.net)
Port27017 (default)
Database NameThe database to connect to
Username / PasswordMongoDB credentials
SSLEnable for encrypted connections (recommended for Atlas)

Testing Your Connection

After entering credentials, click Test Connection. clariBI will attempt to connect and verify:

  1. Network reachability (can it reach the host?)
  2. Authentication (are credentials valid?)
  3. Permissions (can it read tables?)
clariBI Settings Integrations tab showing connected OAuth services and Add Data Source button

If the test fails, see Troubleshooting.

Sync Behavior

After connection, clariBI runs an initial sync to catalog tables and columns. This does not copy your full dataset. When you run an analysis or dashboard query, clariBI queries your database in real time.

For databases, clariBI uses read-only queries. It never writes to, modifies, or deletes anything in your database.

Security Best Practices

  • Always use a read-only user — never connect with admin or write-capable credentials
  • Enable SSL to encrypt data in transit
  • Whitelist IPs if your database is behind a firewall. Contact support for clariBI's IP range.
  • Rotate credentials periodically and update them in clariBI's Data Sources settings
  • Limit table access — grant SELECT only on the specific tables you want to analyze

Pro Tip

If you have large tables with millions of rows, consider creating database views that pre-filter or aggregate the data you want to analyze. This makes queries faster and reduces the data volume sent through the connection.

Related

Ready to try clariBI?

Start your free 14-day trial. No credit card required.