Skip to main content
Mist can show and query three kinds of database:
  • Reporting databases: your company’s Fluid data, such as orders, customers and products, plus data from Fluid Connect connectors. An admin turns these on in the admin.
  • Mist app databases: the database behind each Mist app you build.
  • Your own Postgres databases: any Postgres database you connect.
Every database session in Mist is read-only. You and Mist can look at data, but not change it.

Before you start

  • Reporting databases appear only after an admin turns them on, on the Databases screen in the admin. Your role must also be one of the roles listed there under Who has access.
  • To see a Mist app’s production database, your role needs the same reporting-database access.
Database contents can include personal and financial data. Queries and results may be processed by AI model providers when you ask Mist about them. Read the risk notice on the Databases screen.

Open a database

In the sidebar, open the Code group and find Databases. Click a database to open the database viewer. The viewer has two tabs:
  • Browse: the tables in the database. Type in Filter tables… to find one, then click it to see its rows.
  • SQL: write and run your own query.
For a Mist app’s database, a Local and Production switch picks which copy you see. It starts on Local when the app is on your computer. Local is the app’s database on your computer. Production is the live app’s database.

Ask Mist about your data

In the chat, ask a question in plain words, such as “Which 10 products sold the most last month?”. Mist writes the query, runs it and shows the answer in the chat. Click Open in SQL editor to see and change the query Mist wrote. To build a live dashboard from your data, type /dashboard. See Slash commands.
When Mist queries a Mist app’s database for you, it uses the production database unless you ask for the local one.

Run your own query

1

Open the SQL tab

Open the database, then click SQL.
2

Write the query

Write a query that reads data, such as a SELECT.
3

Run it

Click Run, or press Cmd+Enter (Ctrl+Enter on Windows).
To keep a query, click Save. Your queries are under Saved queries, on this computer. To download the results, click Export result to CSV.

Connect your own Postgres database

1

Open the dialog

In the Code group, click + next to Databases. The Add Database Connection dialog opens.
2

Enter the details

Enter a Name, then the Host, Port, Database, User and Password. Turn on Require SSL if your database needs it.
3

Save it

Click Add Connection.
Mist stores the password encrypted in your computer’s keychain. To copy the connection details later, right-click the database and click Copy connection string.

Limits

  • Only read-only queries run: SELECT, EXPLAIN and SHOW. Any other query is rejected with Only read-only queries are allowed.
  • A query stops after 60 seconds.
  • On a production database, avoid slow, expensive queries. They run against the live database.

Frequently asked questions

An admin has to turn on the Fluid database on the Databases screen, and your role has to be one that can query reporting databases. Ask an admin to check Who has access on that screen.
Mist gets you a personal sign-in for a Mist app’s production database. Each time Mist gets a new one, the previous one stops working, on every computer. When the sign-in on one computer stops working, Mist gets a new one the next time it connects there, which ends the sign-in on your other computer.
No. Voice conversations need a project folder on your computer, and databases don’t have one. You can still dictate a message. See Voice.