MySQL Database (Private)

Deploys a single MySQL server on a private network with no public access. Designed to be used as a backend database for application stacks or accessed via VPN or jump server.

Architecture:

  • 1 Instance (NanoBoost — 2 vCPU, 4 GB RAM)

  • 1 private network

  • 50 GB boot volume

  • No floating IP

  • Security group allows 3306 from private subnet, 22 from private subnet

What is automated:

  • Instance creation with selected flavor and image

  • Private network, subnet, and router

  • Floating IP assigned to Instance

  • Security group: port 22 (public), port 3306 (10.200.0.0/24 only), ICMP (subnet only)

  • MySQL 8.0 installed and configured

  • Bind address set to 0.0.0.0 (access controlled by security group)

  • Random root password generated and saved

Before you launch:

Update these parameters in the template or at launch time:

Parameter
Default
What to change

key_name

stack-test

Required. Replace with your SSH keypair name from Compute - Key Pairs.

image

Ubuntu 22.04 Updated

Change only if you need a different OS image.

flavor

NanoBoost

Change only if you want a different Instance size.

volume_size

50

Increase for larger databases (in GB).

public_network

Public

Do not change unless your cloud has a different external network name.

circle-info

key_name is the only parameter you must change before launching. Everything else works with defaults.

MySQL Template

Save as mysql-private.yaml and upload via Orchestration or Past Direct.

Access:

  • SSH: only from another Instance on the same private network

  • MySQL: connect from application instance at private-ip:3306

  • Credentials: sudo cat /root/.db_credentials

Deploy:

  1. Upload mysql-private.yaml

  2. Select keypair, flavor, image

  3. Launch stack

circle-info

Port 3306 is not accessible from the internet. Connect from other VMs on the same 10.200.0.0/24 network, or use SSH tunneling.

Last updated