> ## Documentation Index
> Fetch the complete documentation index at: https://blog.clouddley.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Deploy MySQL Database on a Scaleway Instance using Clouddley

> Learn how to deploy MySQL database on a Scaleway Instance using Clouddley.

export const date_0 = "Updated on July 17, 2025"

Want to deploy a [MySQL](https://www.mysql.com/) database on a Scaleway instance? You don’t need to worry about the setup. In this guide, we’ll show you how to deploy a MySQL database on a Scaleway instance using [Clouddley](https://clouddley.com). The steps are straightforward, and by the end, you’ll have your database ready to go.

## Prerequisites

To follow this tutorial, you will need:

* A [Clouddley account](https://clouddley.com/)
* A [Scaleway account](https://www.scaleway.com/en/)
* An [API key](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) on Scaleway to manage your instances.
* Basic familiarity with command line interface

## Create a Scaleway Instance

* First, install the Scaleway CLI if you haven’t already done so. It helps you manage Scaleway resources right from your terminal.

```bash theme={null}
curl -sSL https://install.scaleway.dev | bash
```

* Once it’s installed, authenticate by running the command:

```bash theme={null}
scw init
```

You’ll be prompted to enter your <b>access key</b> and <b>secret key</b>. You can [generate](https://www.scaleway.com/en/docs/iam/how-to/create-api-keys/) these from your Scaleway Console under `API Keys`.

* To make sure everything’s working run:

```bash theme={null}
scw instance server list
```

You should see a list of any existing servers or none if this is your first time.

* Configuring security groups is essential for controlling access to your instance. Create a security group that allows HTTP and HTTPS traffic:

```bash theme={null}
scw instance security-group create name=my-sec-group description="Allow port access"
```

This command creates a security group named `my-sec-group`.

See the output below:

<Frame caption="Creating a Security Group">
  <img src="https://mintcdn.com/clouddley/YkMcNqR8t_n43UbS/images/scaleway-create-sec.png?fit=max&auto=format&n=YkMcNqR8t_n43UbS&q=85&s=e4f788509b6d9883e066c0f0337cc104" width="1697" height="720" data-path="images/scaleway-create-sec.png" />
</Frame>

* Next, add rule to allow inbound traffic on port `22`. Run the command:

```bash theme={null}
scw instance security-group create-rule \
  security-group-id=<your-sg-id> \
  protocol=TCP \
  direction=inbound \
  action=accept \
  ip-range=0.0.0.0/0 \
  dest-port-from=22
```

<Info>Replace `<your-sg-id>` with the ID of the security group you just created. You can find your security group ID by running the command `$ scw instance security-group list` and this will list all security groups.</Info>
This command allows SSH access to your instance.

* Now, create a new instance:

```bash theme={null}
scw instance server create \
  name=app-server \
  type=DEV1-S \
  image=ubuntu_focal \
  zone=fr-par-1 \
  ip=new \
  security-group=id=<your-sg-id>
```

<Info>Replace `<your-sg-id>` with the ID of the security group you created earlier.</Info>
This command creates a new instance named `app-server` with the `DEV1-S type`, using the `Ubuntu Focal image` in the `fr-par-1` zone. It also assigns a new public IP and applies the security group you created earlier.

You should see output similar to this:

<Frame caption="Creating a Scaleway Instance">
  <img src="https://mintcdn.com/clouddley/YkMcNqR8t_n43UbS/images/main-create-server.png?fit=max&auto=format&n=YkMcNqR8t_n43UbS&q=85&s=2d77ecd404e179e1c00fb1cf80d6630c" width="1427" height="647" data-path="images/main-create-server.png" />
</Frame>

Once your server is ready, get its public IP:

```bash theme={null}
scw instance ip list
```

You should see your new instance listed with its public IP address. Note this down, as you’ll need it later.

## Deploy

You now have your Scaleway instance set up. Next, we’ll deploy a MySQL database using Clouddley.

<b>Step 1: Access Databases</b>

* Log in to your [Clouddley account](https://app.clouddley.com/auth/signin).
* Navigate to the <b>Databases</b> on the left sidebar.
* Click on <b>Deploy Database</b>

<Frame caption="Accessing Databases">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-dashboard.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=98b7fbb13523d355fa5d87886511629f" width="3780" height="1705" data-path="images/Dbs-dashboard.png" />
</Frame>

<br />

<b>Step 2: Configure your virtual machine(VM)</b>

* In the **choose or add server** dropdown, select your VM if it's listed. If not, select **+ Add Virtual Machine** and enter your instance IP address as the **VM host**, along with the **VM User** and **SSH port**.
* After adding the details, verify the connection with the **Clouddley CLI (recommended)** or **SSH.**

<Accordion title="How to Install Clouddley CLI to Verify your Scaleway Instance">
  - Open your local machine’s command line, then connect to the remote VM you want to configure with Clouddley. Use this command to SSH into your Scaleway instance:

  ```bash theme={null}
  ssh root@<your-instance-ip>
  ```

  * Install Clouddley CLI by running the command:

  ```bash theme={null}
  curl -L https://raw.githubusercontent.com/clouddley/cli/main/install.sh | sh
  ```

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

  ```bash theme={null}
  clouddley add key
  ```

  Using the CLI, you can deploy resources, manage configurations, and automate tasks efficiently.
</Accordion>

* Click <b>Verify</b> to check the connection.
* Once verified, click on <b>Next</b>.

<Frame caption="Configure virtual machine on Clouddley">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-configure-vm.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=d18addba7ce0b3a86338d06f5790100d" width="3820" height="1707" data-path="images/Dbs-configure-vm.png" />
</Frame>

<br />

<b>Step 3: Configure your database name</b>

* Enter a **name** for your MySQL database.
* Click on **Next**

<Frame caption="Defining a unique name for the MySQL database">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mysql-name.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=9ca2088f8d547cfd62e3ee86d1062544" width="3825" height="1712" data-path="images/Dbs-mysql-name.png" />
</Frame>

<br />

<b>Step 4: Select your database type and version</b>

* Choose <b>MySQL</b> as your database type.
* Select the <b>version</b> of MySQL you want to deploy.
  <Tip>Ensure you select a version that is compatible with your application requirements.</Tip>
* Enable delete protection to prevent accidental deletions.
* Click on <b>Deploy DB</b>

<Frame caption="Selecting the MySQL database type and specifying the version">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mysql.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=2fecb343556cf364222e88422404f488" width="3822" height="1715" data-path="images/Dbs-mysql.png" />
</Frame>

<br />

<b>Step 5: Confirm deployment</b>

* Once your deployment is complete, you will see a confirmation message `Deployed successfully!`

<Frame caption="MySQL database successfully deployed">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-success.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=27451216c04bccb1a40f0d4d41acb4d0" width="3815" height="1712" data-path="images/Dbs-success.png" />
</Frame>

<br />

<b>Step 6: Open database port on Scaleway instance</b>

* Check the port Clouddley has configured for your MySQL database. Then, add a new rule to your Scaleway security group to allow traffic for that port. For example, if Clouddley configured port `13526`, run:

```bash theme={null}
scw instance security-group create-rule \
  security-group-id=<your-sg-id> \
  protocol=TCP \
  direction=inbound \
  action=accept \
  ip-range=0.0.0.0/0 \
  dest-port-from=13526
```

<Info>Replace `<your-sg-id>` with the ID of your security group and `dest-port-from` with the port Clouddley configured for your database.</Info>
You should see output similar to this:

<Frame caption="Creating a Security Group Rule">
  <img src="https://mintcdn.com/clouddley/YkMcNqR8t_n43UbS/images/scaleway-create-rule-13526.png?fit=max&auto=format&n=YkMcNqR8t_n43UbS&q=85&s=1617bbdab1cc3f1518cb4cd2a1a992df" width="1125" height="690" data-path="images/scaleway-create-rule-13526.png" />
</Frame>

You can now connect your MySQL database to your application.

## Manage your database

The Database dashboard makes it easy to manage your MySQL database on Scaleway instance. You can deploy, monitor, and maintain your database.

Here’s what you can do:

* View real-time logs to check performance and troubleshoot fast.

* Reset passwords securely with built-in authentication and encryption.

* Prevent accidental deletions with built-in delete protection.

* Manage the database users and access control.

<Frame caption="Database dashboard">
  <img src="https://mintcdn.com/clouddley/p_iVNvg5jCvbMG-4/images/Dbs-mysql-overview.png?fit=max&auto=format&n=p_iVNvg5jCvbMG-4&q=85&s=734d6c05c7eae667bc6f57404f7a4147" width="3790" height="1712" data-path="images/Dbs-mysql-overview.png" />
</Frame>

Everything you need to manage your database is right where you need it.

## Conclusion

You’ve now seen how easy it is to deploy a MySQL database on a Scaleway instance using Clouddley. With just a few steps, you have set up a reliable database.

Got feedback or ideas to improve the experience? We’d love to [hear from you](https://clouddley.productlane.com/roadmap). We can’t wait to see what you deploy next!

<Card title="Getting started with Clouddley?" icon="user-plus" cta="Sign up today and enjoy a 30-day free trial — no credit card required" href="https://app.clouddley.com/auth/signup" horizontal>
  A backend infrastructure for your own compute. Run apps, databases, brokers, and AI workloads on your VMs, bare metal, or VPS.
</Card>

## Resources

* [Clouddley Documentation](https://docs.clouddley.com/)
* [MySQL Documentation](https://dev.mysql.com/doc/)
* [Scaleway Documentation](https://www.scaleway.com/en/docs/)
* [Scaleway CLI Documentation](https://www.scaleway.com/en/docs/cli/)

<div className="flex items-center gap-2.5 mb-6 py-0 my-0">
  <img src="https://res.cloudinary.com/dkbbdg1ko/image/upload/faith-kovi-headshot_hbezxg" alt="Faith Kovi" className="w-12 h-12 rounded-full" />

  <div>
    <div className="flex items-center gap-3">
      <p className="text-sm text-gray-600 dark:text-gray-300 flex items-center gap-1 py-0 my-0">
        <span>By</span>

        <a href="https://x.com/Vera__Kaka" target="_blank" rel="noopener noreferrer" className="font-semibold">
          <span>Faith Kovi</span>
        </a>
      </p>

      <button
        onClick={async () => {
      if (navigator.share) {
        try {
          await navigator.share({
            title: document.title,
            text: "Check this out!",
            url: window.location.href,
          });
        } catch (error) {
          console.error("Error sharing:", error);
        }
      } else {
        alert("Sharing not supported on this device/browser.");
      }
    }}
        className="ml-1 hover:scale-110 transition-transform duration-200 ease-in-out"
      >
        <Icon icon="share-nodes" iconType="light" color="#D1D5DB" size="20" />
      </button>

      <button
        onClick={() => {
      navigator.clipboard.writeText(window.location.href);
      alert("Link copied!");
    }}
        className="ml-1 hover:scale-110 transition-transform duration-200 ease-in-out"
      >
        <Tooltip tip="Copied!">
          <Icon icon="clone" iconType="light" color="#D1D5DB" size="18" />
        </Tooltip>
      </button>
    </div>

    <p className="text-xs text-gray-500 py-1 my-0">
      {date_0}
    </p>
  </div>
</div>
