# 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.

Source: https://sqlly.app/errors/libsql/cli-database-not-found
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error: `database not found`
- Category: Remote server and Hrana errors

Error message:

```text
database not found: <name>
```

## What it means

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.

## Common causes

- The database name is misspelled.
- The CLI is pointed at a different organization than the one holding the database.
- The database was destroyed.

## How to fix it

1. List what the CLI can actually see:

   ```sql
   turso db list
   ```
2. Check the active organization and switch if needed:

   ```sql
   turso org list
   turso org switch <org>
   ```

## Reproduce it safely

```sql
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.
```

## How SQLly helps

SQLly connects by URL, not by database name, so CLI organization scoping does not affect it: paste the `libsql://` URL from `turso db show` and the connection works or fails on its own merits.

## Questions

### 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.

## Related errors

- [`404 Not Found`](https://sqlly.app/errors/libsql/database-not-found-404): 404 Not Found: unknown database or endpoint
- [`401 Unauthorized`](https://sqlly.app/errors/libsql/unauthorized-401): 401 Unauthorized: bad or missing auth token
- [`no organization`](https://sqlly.app/errors/libsql/cli-no-organization): turso CLI: no organization

The code and message text are from the [libSQL / Turso documentation](https://docs.turso.tech/).
