create-database
Creates a child database in the current database.
fauna create-database DBNAME
Description
The create-database
command creates a child database within the
current database, with the name that you specify. If you don’t pass any
options at the command line, Fauna uses the default options specified
in the fauna-shell
configuration file.
Options
Option | Description |
---|---|
|
Optional - The Fauna server domain, that is, the hostname where
Fauna is running. Defaults to |
|
Optional - The name of the endpoint to use for the command. |
|
Optional - The connection port. Defaults to 8443. |
|
Optional - The connection scheme. Must be one of |
|
Optional - The secret to use. A secret authenticates your connection to Fauna, and connects you to a specific database. |
|
Optional - The connection timeout, an integer number of milliseconds.
When the specified period has elapsed, The default is zero, which means that |
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'
Now, when you run fauna shell
and query for a list of databases, you
can see that the new child database my-test-db
is listed:
fauna shell
Connected to https://db.fauna.com
Type Ctrl+D or .exit to exit the shell
Paginate(Databases())
{
data: [
Database("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!