influxdata/influxdb · error · Error
The following Database does not exist
Error message
The following Database does not exist: {0} What it means
This error is the `MissingDb(String)` variant of the HTTP server's `Error` enum in influxdb3_server/src/http.rs, rendered as "The following Database does not exist: {0}". It is thrown when an HTTP API request references a database (bucket) name that InfluxDB 3 does not have. It surfaces for query, write, and other database-scoped API calls where the db parameter does not match any existing database.
Solutions
- List existing databases (e.g. `SHOW DATABASES` or the catalog API) and confirm the exact name
- Create the missing database before retrying (e.g. `CREATE DATABASE mydb` or the write-with-implicit-create path)
- Fix the `db` parameter in the client/config to match an existing database name
- Check you are connected to the intended server/environment
Example fix
// before
curl -X POST 'http://localhost:8181/api/v3/query_sql' -d '{"db": "weather_data", "query": "SELECT * FROM temps"}'
// after
curl -X POST 'http://localhost:8181/api/v3/query_sql' -d '{"db": "weather", "query": "SELECT * FROM temps"}' // db exists (verified via SHOW DATABASES)
-- or, create it first:
CREATE DATABASE weather Defensive patterns
Strategy: validation
Validate before calling
// before calling the HTTP API
const dbs = await fetch('http://localhost:8181/api/v3/query_sql', {
method: 'POST',
body: JSON.stringify({ db: 'internal', q: 'SHOW DATABASES' })
}).then(r => r.json());
if (!dbs.some(r => r[Object.keys(r)[0]] === dbName)) {
throw new Error(`db ${dbName} does not exist on this server`);
} Type guard
function dbExists(dbName, existingDbs) {
return typeof dbName === 'string' && existingDbs.includes(dbName);
} Try / catch
try {
await query(dbName, sql);
} catch (e) {
if (e.message.startsWith('The following Database does not exist')) {
await createDatabase(dbName);
return query(dbName, sql); // retry once after creating
}
throw e;
} Prevention
- Run SHOW DATABASES and keep the db name in shared config rather than hardcoding
- Automate database creation in environment provisioning scripts
- Watch for case/whitespace differences in db names between environments
- Use one client-config source of truth across dev/staging/prod
When it happens
Trigger: Sending an HTTP API request (e.g. POST /api/v3/query_influxql, /api/v3/query_sql, or a write path) whose `db` parameter names a database that was never created or was deleted.
Common situations: Typo or wrong casing in the db name; pointing a client at a fresh server where the database was never created; switching environments (dev vs prod) where the database exists elsewhere; database deleted by retention/management operations between calls.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- The following Database Table does not exist
- Cannot parse the given human time
- Cannot parse the timestamp
- cannot write to soft-deleted database
- database should exist by id
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/e8818d0e38a37f77.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_server/src/http.rs:373
#[error("Python plugins not enabled on this server")]
PythonPluginsNotEnabled,
#[error("Plugin error: {0}")]
Plugin(#[from] influxdb3_processing_engine::plugins::PluginError),
#[error("Processing engine error: {0}")]
ProcessingEngine(#[from] influxdb3_processing_engine::manager::ProcessingEngineError),
#[error(transparent)]
Influxdb3TypesHttp(#[from] influxdb3_types::http::Error),
#[error("Authorization error: {0}")]
ResourceAuthorization(#[from] ResourceAuthorizationError),
#[error("Authentication error: {0}")]
Authentication(#[from] AuthenticatorError),
#[error("The following Database does not exist: {0}")]
MissingDb(String),
#[error("The following Database Table does not exist: {0}")]
MissingTable(String),
#[error("Cannot parse the given human time: {0}")]
ParsingHumanTime(#[source] humantime::DurationError),
#[error("Cannot parse the timestamp: {0}")]
ParsingTimestamp(#[from] chrono::ParseError),
#[error("Timestamp is out of range")]
TimestampOutOfRange,
#[error("Current node mode does not use the processing engine")]
NoProcessingEngine,
#[error("invalid request: {0}")]View on GitHub (pinned to 06200ef96b)