Passer au contenu
Clodo

MySQL Remote Connection Access and Automated Backups

Guide to enabling remote access on MySQL, configuring user grants, and setting up automated mysqldump backups.

Intermédiaire6 minMis à jour :13 septembre 2026
Vérifié : MySQL 8.0MariaDB 10.6 / 11.x

To allow multiple game servers, bots, or web applications to share a centralized database, MySQL must accept remote connections. By default, fresh MySQL installs only bind to localhost (127.0.0.1).

Centralized SQL Database & Secure Remote Access Flow

Architecture allowing multiple nodes to connect to a central database securely via SSL and IP whitelisting.

ARCHITECTURE FLOW
1İSTEMCİ
Remote Clients

Minecraft nodes, Discord bots, and web hosts.

2TLS 1.3
SSL/TLS Layer

Credentials and sensitive rows are encrypted in-transit.

3GÜVENLİK DUVARI
UFW & IP Whitelist

Strict packet filter permits designated server IPs only.

4SQL MOTORU
Clodo MariaDB 10.11

Processes transactional queries on PCIe NVMe with ultra-low latency.

5YEDEKLEME
Automated Nightly Snapshot

Every night at 03:00, compressed gzip dumps are archived.

1. Configuring Bind Address#

/etc/mysql/mysql.conf.d/mysqld.cnf
# Varsayilan 127.0.0.1 yerine:
bind-address = 0.0.0.0

2. Granting Remote User Privileges#

MySQL Konsolu
CREATE USER 'clodo_user'@'%' IDENTIFIED BY 'GucluSifre123!';
GRANT ALL PRIVILEGES ON veritabanim.* TO 'clodo_user'@'%';
FLUSH PRIVILEGES;

3. Nightly Automated Backups with Crontab#

crontab -e
0 3 * * * mysqldump -u clodo_user -p'GucluSifre123!' veritabanim | gzip > /backups/db-$(date +\%F).sql.gz

4. Database Management Methods Compared#

Comparaison des méthodes

Comment implémenter cela ?

Clodo Managed Database Solution

Separate database service

On Clodo a database is not a sub-item created by a button; it is a service of its own. You open a MariaDB plan from the Managed Database category, and its credentials appear on the Database card of the service detail page.

Où dans le panneau ? Open a MariaDB plan under Pricing > Managed Database; host, port, user and password appear on the 'Database' card of the service detail page.
Exécution étape par étape :
  1. 1Open the MariaDB plan from the Managed Database category; no OS install or mysqld configuration required.
  2. 2Copy the host, port, username, password and ready-made connection string from the 'Database' card on the service detail page.
  3. 3Put those values into your game server's or application's configuration.
  4. 4Backups are your responsibility: run the mysqldump steps from this guide on a schedule. There are no automatic backups.

Questions fréquentes

Can I specify a specific IP address instead of '%' when creating a remote user?

Yes. You can replace the '%' wildcard with the specific IP address of your application server to restrict access. This significantly improves database security.

What should I do after changing the bind-address setting in mysqld.cnf?

You must restart the MySQL service for the changes to take effect. Then verify that the port is listening and that your firewall allows traffic on port 3306.

Does Clodo automatically store the backups created by mysqldump?

No. Automated backups are not included with the plans; you must transfer your database archives to a secure remote location or your local machine yourself.

Can multiple game servers or bots share the same database?

Yes. By configuring the authorized remote credentials in your applications across different servers, you can connect concurrently to the same database.

Ce guide vous a-t-il été utile ?

Les retours sont directement transmis à l'équipe qui maintient ce guide.

Vous n’avez pas trouvé de solution ?

Vous pouvez ouvrir une demande auprès de notre équipe d’assistance depuis le panneau.

Ouvrir une demande