---
title: mysql
full: true
---

import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api";

<Root>

<API>

<APIInfo method={"POST"} route={"/mysql.create"}>

## mysql-create

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"name"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"appName"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"dockerImage"} type={"string"} required={false} deprecated={undefined}>

<span>Default: `"mysql:8"`</span>

</Property>

<Property name={"projectId"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"description"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"databaseName"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"databaseUser"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"databasePassword"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"databaseRootPassword"} type={"string"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.create" \
  -d '{
  "name": "string",
  "appName": "string",
  "dockerImage": "mysql:8",
  "projectId": "string",
  "description": "string",
  "databaseName": "string",
  "databaseUser": "string",
  "databasePassword": "string",
  "databaseRootPassword": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.create", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"GET"} route={"/mysql.one"}>

## mysql-one

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Query Parameters

<Property name={"mysqlId"} type={"string"} required={true} deprecated={false}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X GET "http://localhost:3000/api/mysql.one?mysqlId=string"
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.one?mysqlId=string", {
  method: "GET"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.start"}>

## mysql-start

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.start" \
  -d '{
  "mysqlId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.start", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.stop"}>

## mysql-stop

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.stop" \
  -d '{
  "mysqlId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.stop", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.saveExternalPort"}>

## mysql-saveExternalPort

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"externalPort"} type={"number | null"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.saveExternalPort" \
  -d '{
  "mysqlId": "string",
  "externalPort": 0
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.saveExternalPort", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.deploy"}>

## mysql-deploy

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.deploy" \
  -d '{
  "mysqlId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.deploy", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.changeStatus"}>

## mysql-changeStatus

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"applicationStatus"} type={"string"} required={true} deprecated={undefined}>

<span>Value in: `"idle" | "running" | "done" | "error"`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.changeStatus" \
  -d '{
  "mysqlId": "string",
  "applicationStatus": "idle"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.changeStatus", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.reload"}>

## mysql-reload

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"appName"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.reload" \
  -d '{
  "mysqlId": "string",
  "appName": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.reload", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.remove"}>

## mysql-remove

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.remove" \
  -d '{
  "mysqlId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.remove", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.saveEnvironment"}>

## mysql-saveEnvironment

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

</Property>

<Property name={"env"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.saveEnvironment" \
  -d '{
  "mysqlId": "string",
  "env": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.saveEnvironment", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/mysql.update"}>

## mysql-update

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"mysqlId"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"name"} type={"string"} required={false} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"appName"} type={"string"} required={false} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"description"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"databaseName"} type={"string"} required={false} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"databaseUser"} type={"string"} required={false} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"databasePassword"} type={"string"} required={false} deprecated={undefined}>

</Property>

<Property name={"databaseRootPassword"} type={"string"} required={false} deprecated={undefined}>

</Property>

<Property name={"dockerImage"} type={"string"} required={false} deprecated={undefined}>

<span>Default: `"mysql:8"`</span>

</Property>

<Property name={"command"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"env"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"memoryReservation"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"memoryLimit"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"cpuReservation"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"cpuLimit"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"externalPort"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"applicationStatus"} type={"string"} required={false} deprecated={undefined}>

<span>Value in: `"idle" | "running" | "done" | "error"`</span>

</Property>

<Property name={"createdAt"} type={"string"} required={false} deprecated={undefined}>

</Property>

<Property name={"projectId"} type={"string"} required={false} deprecated={undefined}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/mysql.update" \
  -d '{
  "mysqlId": "string",
  "name": "string",
  "appName": "string",
  "description": "string",
  "databaseName": "string",
  "databaseUser": "string",
  "databasePassword": "string",
  "databaseRootPassword": "string",
  "dockerImage": "mysql:8",
  "command": "string",
  "env": "string",
  "memoryReservation": 0,
  "memoryLimit": 0,
  "cpuReservation": 0,
  "cpuLimit": 0,
  "externalPort": 0,
  "applicationStatus": "idle",
  "createdAt": "string",
  "projectId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/mysql.update", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

</Root>