FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date.

For more details, review the migration guide. Contact support@fauna.com with any questions.

list-databases

List child databases in the current database.

Syntax

fauna list-databases [OPTIONS]

Description

The list-databases command lists child databases. If you don’t pass any options at the command line, Fauna uses the default options in the fauna-shell configuration file.

It is not possible to use this command to list parent or peer databases. To access a database outside of the current database, use the Fauna Dashboard.

Options

Option Description

--domain=<domain>

Optional Fauna server domain, that is, the hostname where Fauna is running. Defaults to db.fauna.com.

--endpoint=<name>

Optional name of the endpoint to use for the command.

--port=<number>

Optional connection port. Defaults to 8443.

--scheme=<scheme>

Optional connection scheme. Must be one of https or http. Defaults to https.

--secret=<secret>

Optional secret to use. A secret authenticates your connection to Fauna, and connects you to a database.

--timeout=<integer>

Optional connection timeout, an integer number of milliseconds. When the interval has elapsed, fauna-shell stops waiting for a response and displays an error.

The default is zero, which means that fauna-shell waits until a response is received.

Examples

$ fauna list-databases
listing databases
my-test-db

To verify this, run fauna shell and query for a list of databases. Note that the child database my-test-db is listed:

$ fauna shell
Connected to https://db.fauna.com
Type Ctrl+D or .exit to exit the shell
> Database.all()
Database.all()
{
  data: [
    {
      name: "production",
      coll: Database,
      ts: Time("2023-08-21T23:28:56.840Z"),
      global_id: "ywz5gew1syrre"
    },
    {
      name: "internal",
      coll: Database,
      ts: Time("2023-08-21T23:28:56.840Z"),
      global_id: "ywz5gew1syyre"
    },
    {
      name: "my-test-db",
      coll: Database,
      ts: Time("2023-08-30T21:42:29.200Z"),
      global_id: "yw3jf8si4yrrn"
    }
  ]
}

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!