Connect Your Database
Dory can connect to multiple database types. After a connection is added, you can browse schema in Explorer, write SQL in SQL Console, and ask AI questions with database context.
Supported Databases
- ClickHouse
- PostgreSQL and Neon
- MySQL and MariaDB
- SQLite
- DuckDB and MotherDuck
Before You Connect
Prepare the following information:
- Database host, port, username, and password.
- Database name, schema, or file path where required.
- Network access from the machine or container running Dory.
- SSL or SSH Tunnel settings if the database requires them.
- A read-only user when you are connecting to production data.
Recommended Connection Flow
- Open Dory.
- Create or select a workspace.
- Add a new connection.
- Choose the database type.
- Fill in connection settings.
- Test the connection.
- Open Explorer and confirm tables are visible.
Connection Tips by Type
- For ClickHouse, confirm HTTP/native port, user privileges, and whether monitoring tables are available.
- For PostgreSQL and Neon, confirm schema visibility and SSL requirements.
- For MySQL and MariaDB, confirm host access, port, database name, and character set.
- For SQLite and DuckDB, use an absolute file path and make sure Dory can read the file.
- For Docker deployments, mount local database files into the container before connecting to them.
After the Connection Works
Explorer
Browse databases, schemas, tables, columns, and sample rows.
SQL Console
Write and run SQL against the selected connection.
AI Chat
Ask Dory to generate SQL, explain tables, or continue an analysis using schema context.
Saved Queries
Save useful SQL for reuse by yourself or your team.
Common Troubleshooting
Cannot connect to the database
Check host, port, credentials, SSL settings, firewall rules, and whether the database allows connections from Dory.
AI cannot see table structure
Open Explorer first and confirm the tables are visible. If the schema is hidden by permissions, use a role with metadata access.
ClickHouse connection fails
Confirm the correct endpoint, protocol, database, and user privileges. Some managed ClickHouse environments require SSL.
Local file database cannot be accessed
Use an absolute path. In Docker, mount the directory that contains the SQLite or DuckDB file.
Security Advice
- Prefer read-only users for production databases.
- Avoid sharing admin credentials.
- Review AI-generated SQL before execution.
- Limit network exposure for self-hosted deployments.
Next Step
Continue with First Query in 3 Minutes.