> For the complete documentation index, see [llms.txt](https://docs.clouddley.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clouddley.com/databases/how-to-guides/deploy-a-mysql-database-on-clouddley.md).

# Deploy a MySQL Database on Clouddley

Learn how to deploy a MySQL database on Clouddley.

With [Clouddley](https://clouddley.com/triggr), you can easily deploy and manage a [MySQL](https://www.mysql.com/) database, a widely used open-source relational database known for its reliability and performance. This guide walks you through setting up a MySQL database on Clouddley. Whether you're a beginner or an experienced developer, you'll have your database running smoothly in no time.

## Prerequisites

* A [Clouddley](https://clouddley.com/) account
* A virtual machine on a Cloud platform or bare metal server.

## Step-by-step deployment

{% stepper %}
{% step %}

### Accessing Databases

* Log in to your [Clouddley](https://clouddley.com/) account.
* Navigate to [**Databases**](https://app.clouddley.com/services) and Click on **Deploy Database**

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FtlRPvmaVyzDFS1T11G8o%2FDbs-dashboard.png?alt=media&amp;token=68180a8b-c163-4d5d-962e-fe7b862f4e9a" alt="Image of Triggr Databases dashboard."><figcaption><p>Accessing Databases</p></figcaption></figure>
{% endstep %}

{% step %}

### Configure the Virtual Machine (VM)

In the Choose or add server dropdown, select your virtual machine (VM) if it’s already listed. If not, select **+ Add Virtual Machine**.

Enter the required details:

<table><thead><tr><th width="127"></th><th></th></tr></thead><tbody><tr><td><strong>VM Host</strong></td><td><em>Provide the host address of your virtual machine.</em></td></tr><tr><td><strong>VM User</strong></td><td><em>Input the username required to access the virtual machine</em></td></tr><tr><td><strong>Port</strong></td><td><em>Specify the port number for the connection</em></td></tr></tbody></table>

* Use the **Clouddley CLI** (recommended) or connect via **SSH** to verify.

{% tabs %}
{% tab title="Clouddley CLI" %}
The Clouddley CLI is a command-line tool that allows you to interact with the Clouddley Platform from your terminal.

* Open the command line of the remote VM you want to configure to Clouddley and install Clouddley CLI by running the command:

```bash
curl -L https://raw.githubusercontent.com/clouddley/cli/main/install.sh | sh
```

* To add the SSH public key, run the command:

```bash
clouddley add key
```

Using the CLI, you can deploy resources, manage configurations, and automate tasks efficiently.
{% endtab %}

{% tab title="SSH" %}

* Download the public key to your local machine.
* Ru**n** the provided command on your local machine, allowing Clouddley to connect to your virtual machine.

```
ssh-copy-id -f -i ~/path/to/downloaded/Publickey username@ipaddress
```

{% hint style="info" %}
Replace `~/path/to/downloaded/Publickey` ,`username` and `ipaddress`  with your actual values.
{% endhint %}
{% endtab %}
{% endtabs %}

* Click on **Verify** to validate the details and confirm the connection.
* Click **Next** to proceed.

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FAp7SFQG9SID9WIIdLs1k%2FDbs-configure-vm.png?alt=media&amp;token=cdaf77cf-c40a-4fe3-8707-28bcf62fb7f5" alt="Configuring the virtual machine during database deployment on Clouddley."><figcaption><p>Configuring the virtual machine to host your database</p></figcaption></figure>
{% endstep %}

{% step %}

### Database Name

* Enter a unique **name** for your database for easy identification within the virtual machine (VM).
* Click on **Next**

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FuRlsnSRYAQqqvI5oBR1D%2FDbs-mysql-name.png?alt=media&amp;token=a83e4223-804f-4113-b034-a45554c8a9bb" alt="Configuring database name on Clouddley."><figcaption><p>Defining a unique name for the MySQL database</p></figcaption></figure>
{% endstep %}

{% step %}

### Select the Database type and version

* Select MySQL from the dropdown menu
* Select the preferred **version** from the dropdown menu to ensure compatibility with your application.
* (Optional) Enable the Delete Protection option to prevent accidental deletion of your MariaDB database.

{% hint style="info" %}
This feature prevents the database from being destroyed unless explicitly disabled.
{% endhint %}

* Click on **Deploy DB**

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FbCJULaiLGOtRkm0jusdC%2FDbs-mysql.png?alt=media&amp;token=800baa9b-11cf-40f2-96dd-8f27b6e68a13" alt="User selecting the MySQL database type and version."><figcaption><p>Selecting the MySQL database type and specifying the version for deployment</p></figcaption></figure>
{% endstep %}

{% step %}

### Confirm Deployment

* Once the deployment is complete, your Redis database is ready.
* Click **Go to Dashboard** to access and manage your database.

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FxvhqK2CRhloyPtDkGTLd%2FTD-successDeploy.png?alt=media&amp;token=e37f5b70-e33d-465b-bf92-5eec3b490771" alt="Image of MySQL database deployed successfully on Clouddley."><figcaption><p>MySQL database successfully deployed</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Database Dashboard

You can access and manage your database using the user-friendly dashboard interface.

{% tabs %}
{% tab title="Overview" %}
View details about your database, VM, and settings (e.g., Delete Protection), and use the option to delete the database if it is no longer needed.&#x20;

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FqF3FUtaKAeHpkxEw5RVV%2FDbs-mysql-overview.png?alt=media&amp;token=c474b5bf-4ca5-4b07-89fa-2578e44f3181" alt="An image of the overview section of the MySQL database deployed on Clouddley."><figcaption><p>The dashboard overview with a high-level summary of database performance and status</p></figcaption></figure>
{% endtab %}

{% tab title="Connections" %}
Access public and private network details, including username, password, host, port, and database type.

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FdUuXlN4yA8qKSqtdrQPn%2FDbs-mysql-conn.png?alt=media&amp;token=fcd8f25d-cf84-47c7-ace6-1263676c40ac" alt="An image of the connections section of the MySQL database deployed on Clouddley."><figcaption><p>View the public and private network connections to the MySQL database</p></figcaption></figure>
{% endtab %}

{% tab title="Logs" %}
Monitor real-time log streams for troubleshooting and download logs for further analysis.

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2FVzh4QYLiElMnb1Ya62ac%2FDbs-mysql-logs.png?alt=media&amp;token=f230a4e2-b32e-412a-8bb2-f5eecbb815f9" alt="An image of the logs section of the MySQL database deployed on Clouddley."><figcaption><p>Real-time logs for insights into database activity</p></figcaption></figure>
{% endtab %}

{% tab title="Users" %}
Manage a list of database users and securely reset passwords as needed.

<figure><img src="https://3695617198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yp2SdNQtlQTJArGRUVU%2Fuploads%2Fvo6qWJHI4Y4FcVBsF6Um%2FDbs-mysql-users.png?alt=media&amp;token=3ad64d51-e097-4ab1-baf4-2566cea9dd32" alt="An image of the users section of the MySQL database deployed on Clouddley."><figcaption><p>Manage database users through the dashboard's users section</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Conclusion

Clouddley simplifies MySQL database deployment with its user-friendly interface, automated management, and scalable infrastructure. Whether you're handling small projects or large-scale applications, Clouddley ensures your database is properly managed. Explore our [other guides](/databases/how-to-guides.md) to discover more about deploying other databases on Clouddley.
