Skip to main content
Want to deploy a MySQL 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. The steps are straightforward, and by the end, you’ll have your database ready to go.

Prerequisites

To follow this tutorial, you will need:

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.
curl -sSL https://install.scaleway.dev | bash
  • Once it’s installed, authenticate by running the command:
scw init
You’ll be prompted to enter your access key and secret key. You can generate these from your Scaleway Console under API Keys.
  • To make sure everything’s working run:
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:
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:

Creating a Security Group

  • Next, add rule to allow inbound traffic on port 22. Run the command:
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
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.
This command allows SSH access to your instance.
  • Now, create a new instance:
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>
Replace <your-sg-id> with the ID of the security group you created earlier.
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:

Creating a Scaleway Instance

Once your server is ready, get its public IP:
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. Step 1: Access Databases
  • Log in to your Clouddley account.
  • Navigate to the Databases on the left sidebar.
  • Click on Deploy Database

Accessing Databases


Step 2: Configure your virtual machine(VM)
  • 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.
  • 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:
ssh root@<your-instance-ip>
  • Install Clouddley CLI by running the command:
curl -L https://raw.githubusercontent.com/clouddley/cli/main/install.sh | sh
  • To add the SSH public key, run the command:
clouddley add key
Using the CLI, you can deploy resources, manage configurations, and automate tasks efficiently.
  • Click Verify to check the connection.
  • Once verified, click on Next.

Configure virtual machine on Clouddley


Step 3: Configure your database name
  • Enter a name for your MySQL database.
  • Click on Next

Defining a unique name for the MySQL database


Step 4: Select your database type and version
  • Choose MySQL as your database type.
  • Select the version of MySQL you want to deploy.
    Ensure you select a version that is compatible with your application requirements.
  • Enable delete protection to prevent accidental deletions.
  • Click on Deploy DB

Selecting the MySQL database type and specifying the version


Step 5: Confirm deployment
  • Once your deployment is complete, you will see a confirmation message Deployed successfully!

MySQL database successfully deployed


Step 6: Open database port on Scaleway instance
  • 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:
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
Replace <your-sg-id> with the ID of your security group and dest-port-from with the port Clouddley configured for your database.
You should see output similar to this:

Creating a Security Group Rule

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.

Database dashboard

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. We can’t wait to see what you deploy next!

Getting started with Clouddley?

A backend infrastructure for your own compute. Run apps, databases, brokers, and AI workloads on your VMs, bare metal, or VPS.

Resources

Faith Kovi

Updated on July 17, 2025