CloudBeaver Database Management #
CloudBeaver is a web-based database management tool for browsing, querying, and managing the BonsAI Yugabyte database.
Features #
- Visual database schema browser
- SQL query editor with syntax highlighting and auto-completion
- Data viewer and editor with filtering
- ER diagram generation
- Data export (CSV, JSON, SQL)
- Query execution plans
Access #
In Coder Workspace #
- Start your workspace
- Click “Database” app in the workspace dashboard
Local Development #
mise run dev
# Access at http://localhost:8978
First-Time Setup #
On first access, complete the setup wizard:
- Welcome → Click “Next”
- Server Configuration → Accept defaults → “Next”
- Admin Account:
- Username:
admin - Password:
admin123 - Confirm password:
admin123 - Click “Next” → “Finish”
- Username:
- Login with admin / admin123
Add Database Connection #
After logging in:
-
Click “Database” → “New Connection” (+ icon)
-
Select “PostgreSQL”
-
Enter details (choose one method):
Method 1: Individual fields
- Host:
database - Port:
5432 - Database:
bonsai - Username:
postgres - Password:
postgres
Method 2: Connection URL
- Switch to “URL” tab
- URL:
jdbc:postgresql://database:5432/bonsai - Username:
postgres - Password:
postgres
- Host:
-
✓ Save credentials
-
Test Connection → Create
The Yugabyte database connection is now ready.
Common Tasks #
Browse Database #
- Expand connection in left sidebar
- Navigate: Databases → bonsai → Schemas → public → Tables
- Click table to view data
Run SQL Queries #
- Press
Ctrl+Qor click SQL Editor icon - Write query
- Press
Ctrl+Enterto execute
-- Example: View recent documents
SELECT id, name, created_at
FROM documents
ORDER BY created_at DESC
LIMIT 10;
View ER Diagram #
Right-click schema or table → “View Diagram”
Export Data #
- Execute query or view table
- Click Export button
- Choose format: CSV, JSON, SQL, HTML, XML
Tips #
- Use
LIMITin queries for large tables - Save frequently used queries for reuse
- Use filters in data viewer for better performance
- Check Save credentials when adding connections
Troubleshooting #
Cannot Connect #
- Check database:
docker ps | grep yugabyte - Use host
database(notlocalhost) - View logs:
docker logs bonsai-yugabyte
Session Timeout #
Settings → Server Configuration → Increase Session Lifetime
Slow Performance #
- Add
LIMITandWHEREclauses - Use
EXPLAIN ANALYZEfor query optimization - Consider adding indexes