Skip to content

Zero-Config Detection ​

DevDb reads the configuration of your project and connects to the database. You do not write a connection. Detected databases show under Local Databases in the DevDb panel.

DevDb looks in the root folder of the workspace. To use a different folder, set Devdb.customBasePath.

If DevDb does not find your database, use a config file.

Summary ​

SourceSQLiteMySQL / MariaDBPostgreSQLOther
LaravelYesYesYesSQL Server, Redis, MongoDB
Laravel Sail—Yes——
Ruby on RailsYesYesYes—
DjangoYesYesYes—
AdonisJS—YesYes—
DDEV—YesYes—
Supabase (local)——Yes—
Neon Pro——Yes—
Connection URL, Prisma, Drizzle, docker-composeYesYesYesSQL Server, MongoDB, Redis, ClickHouse
Cloudflare D1 (local)Yes———
Turso Pro———libSQL
DynamoDB Local Pro———DynamoDB

Laravel ​

DevDb uses Laravel detection when the workspace has a composer.json file.

SQLite ​

DevDb connects when DB_CONNECTION=sqlite is in .env and config/database.php uses the default SQLite path. DevDb uses the file in DB_DATABASE. If DB_DATABASE is not set, it uses database/database.sqlite.

MySQL, MariaDB and PostgreSQL ​

DevDb reads these keys from .env:

ini
DB_CONNECTION=mysql   # or mariadb, pgsql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_app
DB_USERNAME=root
DB_PASSWORD=secret

If DB_HOST is not set, DevDb uses 127.0.0.1. If DB_PORT is not set, DevDb uses 3306 for MySQL and 5432 for PostgreSQL.

Laravel Sail ​

If the project has a Sail docker-compose.yml, DevDb connects to 127.0.0.1 on the forwarded port (for example ${FORWARD_DB_PORT:-3306}:3306). If that connection fails, DevDb uses DB_PORT from .env.

This also works in dev containers.

DDEV projects

In a Laravel project that runs in DDEV, DevDb ignores .env and uses DDEV detection.

Ruby on Rails ​

DevDb runs bin/rails runner (or bundle exec rails runner) to read the database configuration from config/database.yml. It supports SQLite, MySQL and PostgreSQL.

Requirements:

  • Ruby and the gems of the project are installed.
  • bin/rails runner works in the workspace root.

Django ​

DevDb runs python manage.py shell to read DATABASES from settings.py. It supports SQLite, MySQL and PostgreSQL.

Requirements:

  • manage.py is in the workspace root.
  • A virtual environment is in venv/ in the workspace root (venv/bin/python, or venv\Scripts\python.exe on Windows).
  • Django and the database driver are installed in that virtual environment.

AdonisJS ​

DevDb reads the Lucid configuration (config/database.ts or config/database.js) and these keys from .env:

ini
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=secret
DB_DATABASE=my_app

It supports MySQL and PostgreSQL.

DDEV ​

For a project that runs in DDEV, DevDb runs ddev describe -j and connects to the MySQL, MariaDB or PostgreSQL database of the project.

Requirements:

  • The ddev command is installed.
  • The DDEV project is running (ddev start).

DevDb is listed in the DDEV documentation.

Supabase (local) ​

DevDb detects a local Supabase project from supabase/config.toml. It runs supabase status to get the connection details. The default database port is 54322.

Requirements:

  • The Supabase CLI is installed.
  • The local stack is running (supabase start).

For a Supabase cloud project, use a direct remote connection.

Neon ​

Pro

DevDb looks for a Neon connection string (a host that ends with .neon.tech) in .env and .env.local, then offers to connect. See Neon.

More sources ​

DevDb 4 reads more files in each workspace folder. It reads these files only. It never runs them.

Each database gets its own row, named after its source, for example Postgres (Prisma) or Redis (docker-compose: cache). When more than one source points to the same database, DevDb shows one row and lists the other sources under it.

SourceFilesEngines
Connection URL.env, .env.local, .env.developmentPostgreSQL, MySQL/MariaDB, SQL Server, MongoDB, Redis/Valkey, ClickHouse, SQLite
Prismaprisma/schema.prisma, schema.prisma, prisma/schema/*.prisma, prisma.config.tsPostgreSQL, CockroachDB, MySQL, SQL Server, MongoDB, SQLite
Drizzledrizzle.config.ts, .js, .mjsPostgreSQL, MySQL, SingleStore, SQLite
docker-composecompose.yaml/.yml, docker-compose.yaml/.yml and the .override filePostgreSQL, MySQL/MariaDB, SQL Server, MongoDB, Redis/Valkey, ClickHouse
Laravel.envSQL Server, Redis, MongoDB

Redis and ClickHouse need DevDb Pro. Without a license, DevDb shows them as locked rows and does not connect to them.

Connection URL ​

DevDb reads these variables: DATABASE_URL, POSTGRES_URL, MYSQL_URL, MONGODB_URI, MONGO_URL, REDIS_URL, CLICKHOUSE_URL. It looks in .env, .env.local and .env.development. The first file that sets a variable wins.

ini
DATABASE_URL=postgres://app:secret@localhost:5432/app
REDIS_URL=redis://localhost:6379/0
  • SQL Server: a URL or a Server=...; connection string.
  • ClickHouse: only an http:// or https:// URL in CLICKHOUSE_URL.
  • SQLite: a file: URL.

Prisma ​

DevDb reads the datasource of the Prisma schema. It also reads prisma.config.ts (Prisma 7). A SQLite path is relative to the schema file.

Drizzle ​

DevDb reads dbCredentials in drizzle.config.ts, .js or .mjs: a url, or host, port, user, password and database. The values can be literals or process.env.X.

A config with dialect: 'turso' goes to Turso.

docker-compose ​

DevDb reads services that publish a port. It gets credentials from environment, and ${VAR:-default} values from .env.

ImagesEngine
postgres, pgvector, postgis, timescaledbPostgreSQL
mysql, mariadb, perconaMySQL / MariaDB
SQL ServerSQL Server
mongoMongoDB
redis, valkey, redis-stack, keydb, dragonflyRedis / Valkey
clickhouseClickHouse

DevDb also finds DynamoDB Local services.

MySQL and PostgreSQL services of a Laravel project stay with the Laravel source.

Laravel: SQL Server, Redis and MongoDB ​

DevDb reads more Laravel connections from .env:

  • SQL Server: DB_CONNECTION=sqlsrv.
  • Redis: REDIS_* values, when a cache, session, queue or broadcast driver is redis (CACHE_STORE, CACHE_DRIVER, SESSION_DRIVER, QUEUE_CONNECTION, BROADCAST_CONNECTION or BROADCAST_DRIVER). Redis needs DevDb Pro.
  • MongoDB: the mongodb/laravel-mongodb package, with DB_CONNECTION=mongodb or MONGODB_URI.

TLS ​

  • sslmode=require turns on TLS without a certificate check, as in libpq.
  • sslmode=verify-full turns on TLS and checks the certificate.

Not in these sources ​

  • Neon (*.neon.tech) and Supabase (*.supabase.co) hosts stay with their own providers.
  • libSQL/Turso and Cloudflare D1 have their own providers. See Turso and Cloudflare D1.

Cloudflare D1 (local) ​

DevDb finds the d1_databases bindings in wrangler.json, wrangler.jsonc or wrangler.toml and opens the local SQLite file of each binding. Local D1 is free. See Cloudflare D1.

Turso ​

Pro

DevDb finds TURSO_DATABASE_URL and TURSO_AUTH_TOKEN in .env, or a drizzle.config with dialect: 'turso'. See Turso.

Detection order and conflicts ​

DevDb lists every source that it detects. If more than one source is available, select one in the panel.

To see why a source is not detected, open the DevDb output channel. See Troubleshooting.

DevDb - Zero-config database client for VS Code