---
title: "Create a new mysql"
method: POST
path: "/api/projects/{projectName}/mysqls"
tags: ["mysql"]
---

# Create a new mysql

`POST /api/projects/{projectName}/mysqls`

## Request

- Base URL: `https://api.hostim.dev`
- URL: `https://api.hostim.dev/api/projects/{projectName}/mysqls`
- Auth: HTTP bearer

Create a new mysql

## Path parameters

- `projectName` string, required

## Request body

- MySQL
  - `name` string, required: The MySQL name
  - `plan` string, required: The plan of the MySQL instance
  - `cost` number: The cost of the MySQL instance per month
  - `type` string: The type of the mysql instance, either shared or dedicated
  - `ram` number: The amount of RAM in GB
  - `cores` number: The number of CPU cores
  - `storageMB` number: The amount of storage in MB

## Response `200`

Mysql created

- GenericMessage
  - `error` string, required
  - `message` string, required

## Other responses

- `401`: User is not authorized
- `404`: Project not found
- `500`: Internal server error

---

[API](https://skmtc.dev/hostim/apis/hostim-api.md) · [All operations](https://skmtc.dev/hostim/apis/hostim-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostim/apis/hostim-api/revisions/37c35e1026a9?raw)
