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
| Option | Description | Required |
|---|---|---|
--server= | The server name or ID | No |
--name= | Database name (alphanumeric, dashes, underscores; 2-64 chars) | No |
--user= | Database user (alphanumeric, dashes, underscores; 2-64 chars) | No |
--password= | Database password | No |
--description= | A description for the database | No |
--site_id= | Site ID to associate with the database | No |
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}$