> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-feat-ai-sql-walkthroughs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SQLite

> Open and query SQLite database files directly, no server needed

# SQLite Databases

SQLite is a file-based database engine. The whole database is one file on your Mac. The driver ships with TablePro, nothing to install.

## Quick Setup

Click **New Connection**, select **SQLite**, browse for the database file, and click **Save & Connect**. No host, port, or credentials.

Point the path at a file that does not exist and TablePro creates the database on connect.

TablePro registers as a handler for `.db`, `.db3`, `.s3db`, `.sl3`, `.sqlite`, `.sqlite3`, and `.sqlitedb` files, so double-clicking one in Finder opens it directly.

<Frame caption="SQLite connection form">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/Bj1EoTflf_jG6N_3/images/sqlite-connection-form.png?fit=max&auto=format&n=Bj1EoTflf_jG6N_3&q=85&s=c9f90ff0e778cd7443350305c7311a75" alt="SQLite connection form with file path field" width="1560" height="960" data-path="images/sqlite-connection-form.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/Bj1EoTflf_jG6N_3/images/sqlite-connection-form-dark.png?fit=max&auto=format&n=Bj1EoTflf_jG6N_3&q=85&s=8c30e7901a7df0ff6f836bd16b1bb656" alt="SQLite connection form with file path field" width="1560" height="960" data-path="images/sqlite-connection-form-dark.png" />
</Frame>

## Common Locations

| Source         | Path                                                             |
| -------------- | ---------------------------------------------------------------- |
| Safari history | `~/Library/Safari/History.db`                                    |
| Photos         | `~/Pictures/Photos Library.photoslibrary/database/Photos.sqlite` |
| Messages       | `~/Library/Messages/chat.db`                                     |
| Rails          | `./db/development.sqlite3`                                       |
| Django         | `./db.sqlite3`                                                   |
| iOS Simulator  | `~/Library/Developer/CoreSimulator/...`                          |

<Warning>
  System databases may be locked. Quit their parent app before opening.
</Warning>

## Connection URL

```text theme={null}
sqlite:///path/to/database.db
```

See [Connection URL Reference](/databases/connection-urls) for all parameters.

## Features

* The sidebar lists tables and views. Internal `sqlite_*` tables are hidden.
* Table info shows columns, constraints, indexes, foreign keys, and DDL.
* Triggers can be viewed and edited.
* External changes to the file are picked up by a file watcher, no manual refresh needed.

## Troubleshooting

**Locked database**: Close other apps using the file, or check for WAL files (`database.sqlite-wal`, `database.sqlite-shm`) left by a crashed process.

**Can't open**: Verify the path exists and you have read permission on the file.
