DDEV Projects
DevDb Pro provides seamless zero-config integration with DDEV-managed applications, automatically discovering and connecting to your containerized databases.
What is DDEV?
DDEV is an open-source tool for running local web development environments using Docker. It's popular for PHP, Node.js, and Python projects.
Zero-Config Discovery
DevDb automatically detects DDEV projects and connects to their databases without any manual configuration.
How It Works
- Open a DDEV project in VS Code
- DevDb detects DDEV configuration files
- Auto-connects to containerized database
- Start browsing your data immediately
Requirements
- DDEV installed and configured on your system
- Project initialized with DDEV (
ddev config) - DDEV running (
ddev start)
Supported Databases
DevDb works with all DDEV-supported databases:
- MySQL/MariaDB (most common)
- PostgreSQL
- SQLite (if used in project)
Features
Automatic Container Detection
DevDb intelligently discovers:
- Container names from DDEV config
- Database credentials from DDEV environment
- Port mappings for host access
- Database names and types
Real-Time Connection
- Updates automatically when DDEV restarts
- Reconnects if container restarts
- Handles multiple projects simultaneously
Full DevDb Features
All DevDb features work with DDEV:
- Database Client interface
- Quick Table Access
- Data Export
- MCP Server integration
Multi-Project Support
DevDb handles multiple DDEV projects:
Workspace Setup
If you have multiple DDEV projects:
- Open each project in VS Code
- DevDb lists all databases in the sidebar
- Switch between projects by clicking connections
- Each maintains independent state
Example Setup
workspace/
├── project-a/ # DDEV project (MySQL)
├── project-b/ # DDEV project (PostgreSQL)
└── project-c/ # Non-DDEV projectDevDb auto-detects:
project-a→ MySQL connectionproject-b→ PostgreSQL connectionproject-c→ Uses manual config if needed
DDEV-Specific Workflows
Database Inspection
- Start DDEV (
ddev start) - Open DevDb (
Cmd+K Cmd+DorCtrl+K Ctrl+D) - Browse tables immediately
- No setup required
Data Seeding
- Create seed data in DevDb
- Export as SQL using Data Export
- Import to DDEV (
ddev import-db) - Or run SQL directly in DevDb
Development Testing
- Edit data directly in DevDb
- Test your app with modified data
- Reset database with
ddev snapshot restorewhen needed - Repeat as needed
Migration Verification
After running migrations:
- Refresh DevDb connection
- Check schema in Schema viewer
- Verify columns and constraints
- Add test data to validate
Configuration Files
DevDb reads these DDEV files:
.ddev/config.yaml- Main DDEV configuration.ddev/docker-compose.yaml- Container setup (if customized)
Example .ddev/config.yaml:
name: my-project
type: php
docroot: public
php_version: "8.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
database:
type: mysql
version: "8.0"DevDb extracts:
- Database type (MySQL)
- Version (8.0)
- Container name
- Credentials
Troubleshooting
Database Not Detected
If DevDb doesn't find your DDEV database:
- Verify DDEV is running:
ddev describe - Check config file exists:
.ddev/config.yaml - Restart DDEV:
ddev restart - Reload VS Code window
Connection Issues
If connection fails:
- Check DDEV status:
ddev status - View logs:
ddev logs -f db - Verify database is healthy:
ddev mysql(for MySQL) - Restart containers:
ddev restart
Multiple Projects Conflict
If projects interfere:
- Check project names are unique in
.ddev/config.yaml - Verify ports don't conflict
- Stop unused projects:
ddev stop - Restart DevDb connection
Performance Issues
For large databases:
- Use filters in DevDb to limit results
- Enable pagination for big tables
- Check DDEV resources:
ddev debug resources - Increase container memory if needed
Advanced Usage
Custom Database Ports
If you've customized DDEV ports:
- DevDb reads port mappings automatically
- No manual config needed
- Connects on correct port
Example custom config:
# .ddev/config.yaml
host_db_port: "33060"DevDb uses port 33060 automatically.
Multiple Databases
For projects with multiple databases:
- Configure in
.ddev/config.yaml:
additional_databases:
- analytics
- logs- DevDb lists all databases
- Switch between them in sidebar
Remote DDEV
For remote DDEV installations:
- Use VS Code Remote SSH
- Open DDEV project remotely
- DevDb works the same way
- Connects through SSH tunnel
Integration with Other Tools
Combine with Laravel
For Laravel projects in DDEV:
- Laravel features work fully
- Code Lens for Eloquent models
- Factory generation
- Query explainer
Use with MCP
Enable AI assistance:
- Setup MCP per MCP Server docs
- AI accesses DDEV database schema
- Generate code with context
Export and Import
- Export from DevDb (JSON or SQL)
- Import to DDEV:
ddev import-db < export.sql - Or use DDEV snapshots:
ddev snapshot
Best Practices
Development Workflow
- Start DDEV before opening VS Code
- Let DevDb auto-connect
- Use Quick Table Access for navigation
- Export data before destructive operations
Team Setup
- Document DDEV setup in project README
- Share .ddev config in version control
- Exclude database dumps from git
- Use consistent DDEV versions across team
Performance
- Stop unused DDEV projects
- Use filters for large tables
- Snapshot frequently for quick resets
- Monitor resources with
ddev debug
Next Steps
- Database Client - Master the interface
- Quick Table Access - Navigate efficiently
- Laravel Integration - If using Laravel
- Data Export - Export and import data