database_create
Create a new MySQL or PostgreSQL database with a dedicated user, with dry-run preview and confirmation for execution.
Instructions
Create a new database (MySQL or PostgreSQL) with a dedicated DB user. WRITE operation — set dry_run:true to preview, confirm:true to execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Database name (MySQL: a-z0-9_, max 64; Postgres: also allows more) | |
| charset | No | Charset: 'utf8' or 'utf8mb4' for MySQL, 'en_US.UTF-8' for PostgreSQL | utf8 |
| confirm | No | ||
| dry_run | No | ||
| site_id | No | Link DB to a site (optional). Null = standalone DB. | |
| owner_id | Yes | FastPanel user id (owner) from users_list | |
| server_id | Yes | DB server id from database_servers_list (1=MySQL, 2=PostgreSQL typically) | |
| db_user_login | Yes | DB user login (the user that owns this DB) | |
| db_user_password | Yes | DB user password (min 8 chars) |