create-database

Create a child database.

Syntax

fauna create-database DBNAME [OPTIONS]

Description

The create-database command creates a child database with the provided database name.

If command line options are omitted, Fauna uses the default configuration file options.

You can’t use this command to create a parent or peer database. To create a database outside of the current database, log into the Fauna Dashboard.

Arguments

Argument Description

DBNAME

Child database name.

Options

Option Description

--domain=<domain>

(Optional) Fauna server domain, which is the Fauna hostname.
Default = db.fauna.com

--endpoint=<name>

(Optional) Endpoint name to use for the command.

--port=<number>

(Optional) Connection port.
Default = 8443

--scheme=<scheme>

(Optional) Connection scheme. Must be one of:
       https (default)
       http

--secret=<secret>

(Optional) Secret to use to connect to a database.

--timeout=<integer>

(Optional) connection timeout, in milliseconds. When the interval elapses, fauna-shell times out and displays an error.
Default = 0, wait indefinitely until a response is received.

--version

(Optional) Fauna Query Language version
       v10 = (default) FQL v10
       v4 = FQL v4

Examples

Create a database called my-test-db:

fauna create-database my-test-db
creating database my-test-db

  created database 'my-test-db'

  To start a shell with your new database, run:

  fauna shell 'my-test-db'

  Or, to create an application key for your database, run:

  fauna create-key 'my-test-db'

Verify the database is created:

fauna list-databases
listing databases
my-test-db

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!