Create database

The database:create command allows you to create a new database on a server.

ploi database:create

Create a database with all options:

ploi database:create --server=blue-ocean --name=my_database --user=db_user --password=secret123

Options

OptionDescriptionRequired
--server=The server name or IDNo
--name=Database name (alphanumeric, dashes, underscores; 2-64 chars)No
--user=Database user (alphanumeric, dashes, underscores; 2-64 chars)No
--password=Database passwordNo
--description=A description for the databaseNo
--site_id=Site ID to associate with the databaseNo

If options are not provided, you will be prompted to enter them interactively.

Validation

  • Database name must match pattern: ^[a-zA-Z0-9_-]{2,64}$
  • User name must match pattern: ^[a-zA-Z0-9_-]{2,64}$