Skip to content

Standalone MySQL (MariaDB, Percona, Oracle)

This guide will take you through the process of setting up your first single-node MySQL/MariaDB/Percona server using ClusterControl. By following this tutorial, you’ll have a fully functional (but non-replicated) database node that you can monitor, manage, and later scale if your requirements change.

A standalone MySQL/MariaDB server is the simplest deployment — perfect for development, testing, or lightweight production workloads. If you decide to expand to replication or a high availability (HA) cluster, you can do so seamlessly from this single-node foundation. This tutorial applies to any of the following MySQL variants:

  • MariaDB
  • Percona
  • Percona Pro
  • Oracle MySQL
See also

Prerequisites

Before proceeding, ensure you have:

  • ClusterControl installed and running. If not, follow the instructions in Quickstart or use the Installer Script.
  • At least two hosts (bare-metal or virtual machines):
    • One for the ClusterControl server.
    • One for the MySQL/MariaDB server.
  • SSH access to all servers.
  • Internet access on the database host to install required packages.
  • Network Time Protocol (NTP) configured and running on both hosts to keep their clocks synchronized.

Architecture

Below is a simplified diagram of the final architecture for a single-node deployment:

flowchart LR
    A[**/Users/<br>clients/<br>apps/**] --> B[(**db1**<br>Standalone<br>192.168.99.101)]
    B -.->|managed by| C(**ClusterControl server**<br>192.168.99.5)

No load balancers or replicas are present here; you have a single MySQL/MariaDB server that directly serves both read and write requests from your applications.

Step 1: Set up SSH key-based authentication

  1. On the ClusterControl server, generate a new SSH key as the root user:

    ssh-keygen -t rsa
    
    Copy the public key to your standalone database node (replace 192.168.99.101 with your node’s IP/hostname):

    ssh-copy-id -i /root/.ssh/id_rsa [email protected]
    
    If the target node uses a custom SSH key or port, you can add options:

    ssh-copy-id -i /root/.ssh/id_rsa -p 22 -o 'IdentityFile /root/myprivatekey.pem' [email protected]
    
  2. Test passwordless SSH from the ClusterControl server:

    ssh [email protected] "ls /root"
    
    Ensure there is no password prompt. If the command returns directory contents, you’re set.

Step 2: Deploy a new cluster (single node)

  1. Open a web browser and go to the ClusterControl server’s IP or hostname.

  2. On the ClusterControl dashboard, click Deploy a cluster (top-right) → Create a database cluster. This opens the Deploy cluster wizard.

  3. Choose "MySQL Replication" from the Database dropdown, choose "MariaDB" or your preferred vendor from the Vendor dropdown and also the database major version from the Version dropdown. Click Continue.

  4. In the Deploy MySQL Replication wizard, configure the database cluster as below:

    • Name: For example, Standalone MySQL.
    • Tags: (Optional) e.g., standalone, production, dc1.
    • SSH user: root
    • SSH user key path: /root/.ssh/id_rsa
    • SSH port: 22
    • SSH sudo password: (leave blank if you rely on key-based auth)
    • Install software: On (default)
    • Disable firewall: Checked (default)
    • Disable SELinux/AppArmor: Checked (default)
    • Server port: 3306 (default)
    • Server data directory: /var/lib/mysql (default)
    • Admin/Root user: root
    • Admin/Root password: Password to be assigned to the database root user
    • Repository: Use vendor repositories (default)
    • Version: Choose the minor version for your selected vendor
    • Configuration template: A default my.cnf or my.cnf.replication
    • Enable SSL encryption: Optional (default off if not required)
    • Standalone node: Enter 192.168.99.101 and press Enter.
    • Wait for the node to turn green. If an error (red) appears, check the logs in Activity center for details.
    • Review your configuration. You can go back and adjust if needed.
  5. Click Finish to start deployment.

  6. ClusterControl will now install and configure MySQL on 192.168.99.101. You can track progress in the Activity center. After a few minutes, your new single-node cluster will appear on the Home page.

Step 3: Monitor your cluster

Once deployed, you’ll see:

  • Cluster health: The Home page provides the cluster state, even though it’s a single node, it’s treated as a "cluster" of size one.
  • Node health: Hover on the honeycomb diagram or check the Nodes tab. You can also see more detailed histograms under ClusterControl GUI → Clusters → choose the cluster → Dashboards.
  • Recent alarms: Any triggered alarms will appear if there are configuration or resource issues.
  • Automatic recovery status: If enabled, ClusterControl can attempt to restart a crashed MySQL server automatically.
  • Topology viewer: You’ll see a very simple topology with only one node.

Step 4: Import data

  1. You can import data into the standalone server in a variety of ways:

    mysql -u root -p -h database_name < dumpfile.sql
    
    LOAD DATA INFILE '/path/to/file.csv'
    INTO TABLE table_name
    FIELDS TERMINATED BY ',' ENCLOSED BY '"'
    LINES TERMINATED BY '\n';
    
  2. If you have a large dataset (hundreds of GB), ensure you have enough disk space and memory.

Step 5: (Optional) Deploy a new load balancer

A load balancer (e.g., ProxySQL, HAProxy) is not necessary for a single-node environment. Typically, it is used for multi-node or high availability setups to split traffic or handle failover. You can skip this entirely if you only have one node.

Tips

If you plan to add replicas or switch to a high-availability cluster later, a load balancer can be introduced at that point. See Create Load Balancers for more info.

Step 6: Connect to the database

Your application or client will connect directly to the standalone server:

  • Host: 192.168.99.101
  • Port: 3306
  • User/Password: The credentials specified during deployment

No load balancer or additional ports are involved.

Step 7: Enable automatic backups

Even for a single node, regular backups are critical. You can create scheduled backups and optionally enable point-in-time recovery (PITR) by keeping binary logs.

  1. Go to ClusterControl GUI → choose the cluster → Backups.

  2. Click Create Backup → Schedule a Backup. The Create a backup schedule wizard will open and proceed to configure your backup as below:

    • Schedule name: Daily backup - mysqldump
    • Backup method: mysqldump (or xtrabackup/mariabackup for physical)
    • Dump type: Complete PITR-compatible
    • Upload backup to cloud: Off (default)
    • Compression: On (default)
    • Compression level: 6
    • Enable encryption: (optional)
    • Verify backup: Off (default)
    • Retention: On (default)
    • Failover backup if node is down: On (default)
    • Store on controller: (default)
    • Storage directory: /root/backups (default)
    • Backup subdirectory: BACKUP-%I (default)
    • Set backup schedule: Simple
    • Every: day at 02:00
    • Timezone: your local timezone
    • Verify all settings. You can go back to adjust if needed.
  3. Click Create to schedule it.

ClusterControl will now automatically perform your backups. You can also enable backup verification, encryption, or point-in-time recovery under the same Backups section.

Step 8: Configure alerts

To keep track of any issues or incidents in your cluster, it's important to set up alerting. ClusterControl supports sending alarms and alerts to email, web hooks and third-party notification services like Slack or Telegram. In this example, we are going to use email.

Firstly, configure the mail server. Go to ClusterControl GUI → Settings → You don't have a mail server configured. Configure now → SMTP Server. Fill up all necessary information about the SMTP server. You can also opt for Sendmail, however a mail transfer agent (sendmail, postfix or exim) must be installed on the ClusterControl server.

Once configured, we can configure the alert and recipients as below:

  1. ClusterControl GUI → choose the cluster → Settings → Email Notifications.
  2. Select a User group (your group) from the User group dropdown.
  3. Select your email address to from the Users in the selected group dropdown.
  4. Click Enable.
  5. Set the Digest delivery time when you want a digested (summarized events) to be sent to you every day.
  6. Set all Critical events to "Deliver" (default), all Warning events to "Digest" and you may ignore the Info events.

This ensures timely notifications when something goes wrong.

Tip

You can also configure alarms to be sent to third-party notification systems (Slack, Telegram), incident management systems (PagerDuty, ServiceNow, OpsGenie) or web hooks. See Integration → Notification Services.

Step 9: Manage your node

ClusterControl offers a range of management features even for a single node:

  • Database upgrades and patching: Perform minor version upgrade to keep your cluster up to date. This feature is available at ClusterControl GUI → choose the cluster → Actions → Upgrades.
  • Database node management: Perform start/stop/restart node, reboot host, bootstrap cluster, activate/deactivate read-only, resync node, change primary source and rebuild replica. These features are available at ClusterControl GUI → choose the cluster → Nodes → Actions.
  • ProxySQL management: Perform ProxySQL management related to query rules, query cache, proxy user management, export configuration, synchronize instances (in cluster mode), restart service and reboot host. These features are available at ClusterControl GUI → choose the cluster → Nodes → Actions and ClusterControl GUI → choose the cluster → Nodes → ProxySQL.
  • Configuration management: Perform database configuration changes globally or on individual database node. This feature is available at ClusterControl GUI → choose the cluster → Manage 🡒 Configuration.
  • Database user management: Manage database users and privileges globally. This feature is available at ClusterControl GUI → choose the cluster → Manage → DB Users.
  • Backup management: Create, schedule, restore, perform point-in-time recovery, upload backup to cloud, verify an existing backup, and set retention period. These features are available at ClusterControl GUI → choose the cluster → Backups → Actions and ClusterControl GUI → choose the cluster → Backups → More.
  • Maintenance management: Activate, deactivate, remark and schedule maintenance mode for all nodes. This feature is available at ClusterControl GUI → choose the cluster → Nodes → Actions → Schedule maintenance.
  • SSH console: Access your nodes directly from ClusterControl GUI via web SSH console. This feature is available at ClusterControl GUI → choose the cluster → Nodes → Actions → SSH Console.

Step 10: Scale your cluster

Scaling your standalone database server into a multi-node setup is straightforward with ClusterControl. You can add new replica nodes (for read scaling or backup offloading), configure a load balancer for improved performance and failover, or even switch to a synchronous replication topology (like Galera) for high availability—all from within the ClusterControl GUI. This means you don’t have to redeploy your database from scratch; instead, you can gradually expand as your workloads and traffic demands increase.

ClusterControl assumes that the new node that you want to add meets the requirements as decribed under Prerequisites and configured with a proper SSH key-based authentication as shown under Step 1: Set up SSH key-based authentication.

  1. To add a new replica, go to ClusterControl GUI → choose the cluster → Actions → Add new → Replica node → Create a replica node.

  2. In the Create a replica node wizard, configure the following:

    • Port: 3306
    • Data directory: /var/lib/mysql
    • Configuration template: my.cnf.repl80
    • Install software: On (default)
    • Disable firewall: Checked (default)
    • Disable SELinux/AppArmor: Checked (default)
    • Rebuild from a backup: Off (default)
    • Include in load balancer set (if exists): On
    • Delay the replica node: Off (default)
    • Primary node: Choose one of the primary node from the dropdown.
    • Node: Specify the IP address or hostname of the node that you want to add and press "Enter".
    • Review the summary of the deploymnent. You can always go back to any previous section to modify your configurations if you wish. The deployment configuration settings will be kept until you exit the wizard.
  3. Click Finish to trigger the deployment job.

  4. ClusterControl will start provisioning the new replica node. You can monitor the progress from Activity center, where you will see detailed logs of the deployment. This process can take a few minutes. Once the deployment is complete, the node will appear in the Nodes page.

Conclusion

Congratulations! You’ve deployed, monitored, and managed a standalone MySQL/MariaDB server using ClusterControl. Although you now have only one node, you can effortlessly evolve this environment to replication or high availability in the future. Remember to:

  • Keep your backups current and tested.
  • Monitor performance and resource usage.
  • Secure your node by restricting access and using strong passwords.
  • Expand to multi-node topologies if your needs grow.

Enjoy your streamlined single-node database deployment, backed by ClusterControl’s powerful operations for backups, alerts, scaling, and more!