A MariaDB primary and two replicas, built by dropping servers in.

MariaDB from the first install to a replicated, encrypted, tuned pair, on screens instead of a terminal and a wiki page. It goes in secured rather than being secured afterwards. Databases, tables, users and backups are things you open. Replication is two servers dragged from the tree: Vigia installs what is missing, makes the primary ready, opens each firewall to the other members only, proves every wire, seeds each replica and leaves them following — and says plainly when the stream would cross the internet in the clear.

MariaDB replication in LockFlare Vigia: a primary and two replicas, both zero seconds behind, and a canvas showing all six wires between the three servers talking
One primary, two replicas at 0 s behind, all six wires proved — and a warning that TLS is not on yet.

Installed secure, not installed and then secured

The install asks for the root password and does the rest on the way in: root through the socket and the password you gave, no anonymous account, no test database, bound to 127.0.0.1. The version is read from the box before you choose: the distribution's own package by default, so updates come with the operating system, or a series from mariadb.org's repository, long-term support marked. It runs as a job on the server — closing Vigia does not stop it — and when it is in, MariaDB appears on the rail, by name.

A new database is made with a user of its own: every right on that database and none elsewhere. The password is made there and shown once, with the connection string for the app beside it to copy. Vigia keeps no copy of it.

The data, without a second tool

The Explorer is the table the way a database tool shows it. Rows in a grid, edited where they are: click a cell, Enter saves, a new row at the foot. A filter built from the columns, or typed by hand. Any statement run as written — reads are free, a write needs a tick. A query saved as a view.

Columns is the structure: every column with its type, null and default, changed, renamed or dropped from its row; indexes with their size and whether anything uses them; foreign keys. Import reads a CSV or a JSON file on your computer, checks it against the columns, and sends it up as one transaction, so a failed load leaves the table as it was. Export writes JSON, CSV or a real Excel workbook on the server first, as a job you can watch, then brings it to your computer.

/ WHO REACHES WHAT

Users, as what they can reach

The accounts list answers the question a grant table never does: who reaches what. The head counts it — how many have everything, how many are scoped, which has no password, which is locked, who is connected now.

  • An account opened is every database it may touch and at which level, with Revoke on the row and Give a database beside it.
  • A new user is a password made there and shown once, one you type, or a certificate. From where — this box only, or elsewhere — and at the app's everyday level, read and write, unless you ask for exact privileges.
  • On the account: a new password, Lock, where it may come from, Require TLS, a certificate, Drop.

Beside it, one box's accounts, and the user a new database is made with.

Security, read from the engine

The firewall decides who reaches the port; this page is everything after it, read from MariaDB itself and said in words, with the fix on the row. Who may connect: where it listens, how root logs in, anonymous accounts, remote root. Whether connections are encrypted. Whether any password is accepted, "password" included. The features that turn a SQL injection into a file read — LOAD DATA LOCAL, file access, symbolic links — each with what it is for and the button that closes it. A fix that needs a restart says so; one that could lock you out asks first.

Further down the same page: Fail2Ban watching the engine's failed logins, the accounts that are root in all but name, the audit plugin, and certificate logins — an account that is a certificate, not a password, signed by an authority that lives on the box with a key that never leaves it. And the files the engine trusts, with owner and mode, because a secret another user can read is a hole.

Backups that run with Vigia closed

A backup is a plan filed on the server: which databases — the ones you tick, or whatever is on the engine that night — each in its own file, with the tables to leave out. When: from cron on the box, the minute picked at random so plans on the same server do not all fire on the hour. What is kept on the box, and where it is pushed: S3 and its houses, Azure, Google Cloud Storage, WebDAV, SFTP or FTP, from the repositories you have described once. Who is mailed when it fails. Vigia can be closed for all of it.

Replication: a primary and its replicas, from the tree

A MariaDB on its own is one copy of the data on one disk. With replication a second box keeps the same data a moment behind, replaying the primary's binary log by GTID: reads can go there, backups can come from there, and when the primary is lost a replica can be promoted.

Say what this box is, then drop the others

Two ways in: this box leads and the others follow it, or this box becomes a replica of another server. Then drag servers from the tree, or a whole group. Vigia opens a shell to each and reads what it runs — a replica has to be empty, or already following this primary, and the page says which.

A box without MariaDB gets it

When a dropped box has no MariaDB, Vigia says so and offers to put it there — the version the pair runs, from the box's own repository when it carries that series and mariadb.org's otherwise, the same install as the package hub, secured on the way in, on all the boxes at once, with one admin password for all. A server whose operating system can offer neither is refused, and named.

The network, said honestly — and the plan, before Apply

Each member's address is the one the others reach it at: a private one when the box has it, so the data never crosses the public network. Choose public addresses and Vigia does not pretend otherwise: the replication stream crosses the internet, the engine's TLS is what makes it private, fine for a playground and not for real data without it. Then the review lists what Apply will do, step by step, in the words of the commands it will run — nothing is written until every box has answered right.

Built, seeded, following

The primary gets binary logging and a server id in one drop-in Vigia owns, restarted once and checked — the previous file goes back if it will not start. A replication login is made, let in from each replica's address only, its password kept on the boxes and nowhere else. Every member opens the port to every other member in its own firewall, and every wire is proved from the box it starts at. Then each replica is seeded with a dump straight from the primary in one transaction, the position captured on the way, and started.

3servers: one primary, two replicas
0 sbehind, both replicas, following by GTID
2 min 50 sto build, timed — MariaDB already installed, a small database to seed

A larger database takes as long as its dump takes to cross.

/ AFTERWARDS

The pair, as it reports itself

The page afterwards is the pair as it reports itself: each member's role, state and how far behind, Promote and Remove on a replica's row, and the wires drawn and proved again whenever you ask.

There is no automatic failover in this, and the page says so: when the primary is lost, Promote makes a replica lead — a switchover while the primary answers, a failover when it does not.

Beside it, the three servers built above, on private addresses.

# replication · srv-01 leads · three members srv-01 primary 10.0.0.11 binary log · GTID srv-02 replica 10.0.0.12 following · 0 s behind Promote · Remove srv-03 replica 10.0.0.13 following · 0 s behind Promote · Remove wires 6 of 6 talking each proved from the box it starts at network private the data never crosses the public network TLS not on yet one button: Vigia as the pair's authority

TLS between the members, with Vigia as the authority

One button. Vigia is the pair's certificate authority — kept in your vault, its key never leaving your computer — and each member gets a certificate carrying every address it answers on. MariaDB loads it with one checked restart per member, replicas first and the primary last, its replicas reconnecting by themselves. Then each replica's stream is moved to TLS with the primary verified by name, and the replication login is made to demand a certificate from the pair's authority. Your apps are not touched: the engine goes on answering plain clients, and only the members' own stream is bound to TLS.

Settings with an opinion

The configuration as rows, not a file: each setting with what it is in a sentence, its value read from the running engine, whether a change is live or needs a restart, and where the value comes from — the engine's default, the distribution's file, or Vigia. Where Vigia would set it differently it says what and why, against the box in front of it: half the RAM for the InnoDB buffer pool on a server that is mostly a database, 1000 IOPS if the disk is an SSD.

And before the rows, what matters on this server today. On the primary built above it said: the buffer pool is 128 MB on a box with 4 GB — the default, sized for a laptop, so every query past the first few megabytes hits the disk. And this box is a primary with two replicas, so a restart from here costs the apps a few seconds, and a switchover first costs them nothing. Every change goes into one file Vigia owns, read last so it wins; the distribution's files are never touched.

What Vigia writes on the server

MariaDB from the distribution or mariadb.org, configured through its own drop-in folder. The distribution's files are read and never written. No agent, and nothing of ours in the path of a query.

/etc/mysql/mariadb.conf.d/90-lens.cnfWritten by the install, with one setting in it: bind-address = 127.0.0.1.
/etc/mysql/conf.d/zz-lens.cnfThe settings file Vigia owns, read last so it wins. It does not exist until the first change writes it, and it can be edited by hand.
/etc/mysql/mariadb.conf.d/zz-lensrepl.cnfWhat replication needs: the server id, the binary log, where it listens, the TLS files. Restarted once, checked, and the previous file put back if the engine will not start.
/root/.lens-mariadb-replThe replication login, on each member, root only. Nothing on your computer holds a database secret.
/etc/lens-tls/mariadb/The member's certificate and key and the pair's CA certificate. The authority's own key stays in your vault.
3306/tcp, from the other membersA rule for each other member, in the box's own firewall. The port is never opened to the world to make replication work.
/var/backups/lens/plansThe backup plans and their copies, root only, run from cron on the box.

Questions people ask

Does Vigia install its own build of MariaDB?

No. It installs the distribution's own package by default, so updates arrive with the operating system, or a series from mariadb.org's repository if you choose one, and secures it on the way in: root through the socket, no anonymous account, no test database, bound to 127.0.0.1. For a replica it installs the version the pair runs, and refuses, by name, a server that cannot offer it.

How does it set up replication?

You drop servers from the tree. Vigia prepares the primary with binary logging and a server id, creates a replication login let in from each replica's address only, opens port 3306 between the members in each box's own firewall, proves every wire, seeds each replica with a dump from the primary in one transaction, and starts it following by GTID.

Is there automatic failover?

No, and the page says so. When the primary is lost you press Promote on a replica's row: a switchover while the old primary still answers, a failover when it does not. If a load balancer built in Vigia fronts the pair, the same job repoints it.

Is the replication traffic encrypted?

Over a private network such as a WireGuard mesh it is encrypted by the network. Over public addresses Vigia warns that the stream crosses the internet in the clear, and one button turns on TLS between the members, with certificates from an authority kept in your own vault and the replication login made to demand one.

Will it overwrite my my.cnf?

No. Every change goes into one drop-in file Vigia owns, read last so it wins, plus one for replication. The distribution's files are read and never written, and the file Vigia owns can be edited by hand.

Does the same work for PostgreSQL?

Yes. PostgreSQL has the same screens and the same replication builder, with streaming replication and slots in place of the binary log, and MongoDB has replica sets and sharding of its own.

Put MariaDB on a server you own

Vigia is free for 10 servers — enough for a primary and its replicas.

Download Vigia