database not found: turso CLI: database not found
The CLI cannot find a database with that name in the current organization: typo, wrong org, or the database was destroyed.
- Fehler
database not found- Kategorie
- Remote server and Hrana errors
Was es bedeutet
The turso CLI resolves database names inside one organization at a time: the active one. database not found: <name> means no database with that name exists in that organization, whether the name is misspelled, the active organization is the wrong one, or the database was destroyed. An app using the SDK resolves a full libsql:// URL instead, so the CLI and the app can disagree about whether a database exists.
Häufige Ursachen
- The database name is misspelled.
- The CLI is pointed at a different organization than the one holding the database.
- The database was destroyed.
Find the cause
`turso db list` shows exactly the names the CLI can see in the active organization. If the database is missing there, check `turso org list` and switch with `turso org switch <org>`: names resolve inside one organization, not across them.
Wie du es behebst
-
List what the CLI can actually see:
turso db list
-
Check the active organization and switch if needed:
turso org list turso org switch <org>
Other ways to handle it
In automation, run the CLI non-interactively (turso auth login --headless) with an API token scoped to the right organization (turso auth api-tokens mint <name> --org <org>). For app connections, skip name resolution entirely and use the URL from turso db show <name> --url.
Sicher reproduzieren
Honest and free with a real account: `turso db show definitely-not-a-db` with a logged-in CLI prints the error. There is no offline repro; the CLI needs the platform to answer.
Fragen
Why does turso say database not found when the database exists?
The CLI only looks in the active organization. Run turso org list to see the organizations you belong to, turso org switch <org> to the one holding the database, then turso db list to confirm the name.
Does this CLI error mean my app's libsql:// URL is wrong too?
Not necessarily. The CLI resolves a bare database name against your organization; the SDK resolves a full <db>-<org>.turso.io host. A CLI failure with a URL that connects points at CLI login or organization state, not at the URL.
Zugehörige Fehler
404 Not Found404 Not Found: unknown database or endpoint401 Unauthorized401 Unauthorized: bad or missing auth tokenno organizationturso CLI: no organization
More remote server and hrana errors errors
429 Too Many Requestsrequest rate limit hitconnection reset / interruptedConnection reset or droppedtoo many connectionsToo many connections to one databaseTransaction timed-outinteractive transaction abortedError in remote responseError in remote response500 Internal Server Errorserver failed on a valid request402 Payment Required402 Payment Required409 Conflict409 Conflict
Der Code und der Meldungstext stammen aus der libSQL / Turso documentation. Durchstöbere die vollständige libSQL error list oder Jeden Datenbankfehler durchsuchen.
Work on libSQL in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for libSQL and the other databases you use.
Text und Daten auf dieser Seite: CC BY 4.0, Quelle: SQLly (sqlly.app). Code und SQL-Snippets: MIT. Lizenzdetails Zitierte Fehlermeldungstexte gehören dem jeweiligen Datenbankhersteller.