MariaDB Setup

Install a shared database so multiple machines can work from one Chordalia index.

Used in: Arion Chordium Cadenzium
About 20 minutes

? What is MariaDB — and when do I need it?

MariaDB is a free, open-source database server. When a Chordalia product uses it, your index (documents, journals, metadata) lives in MariaDB instead of a local SQLite file — which means several machines can share the same index.

You need MariaDB if you want to:

If you only use Chordalia products on one computer, you don't need MariaDB — the default SQLite backend is faster and simpler for single-machine use.

What will it cost?

Nothing. MariaDB is free, open-source, and runs on hardware you already own. You pay only for electricity.

Why MariaDB rather than MySQL? They're nearly interchangeable — MariaDB is a fork of MySQL maintained by MySQL's original author. Chordalia products support both; we recommend MariaDB because it stays free and open-source permanently (some MySQL editions require Oracle licensing for commercial use).

1 Pick which machine will host the database

The MariaDB server runs on one computer on your local network. Other machines connect to it over your home or office network. Things to consider when picking the host:

For a household, the natural choice is usually a desktop PC that's always on anyway. For an office, a dedicated machine or NAS that supports MariaDB directly.

Don't host MariaDB on a laptop you take with you. If the laptop leaves the network, every other machine loses access to its index until it's back. Host on a machine that stays home.

2 Install MariaDB on the host machine

Download the installer from the official MariaDB site:

https://mariadb.org/download/ →

Choose the stable release for your operating system. For Windows, pick the MSI installer — it's the easiest path.

Run the installer

Accept the defaults for most screens. The ones that matter:

The root password is the keys to the kingdom. Anyone with this password can read, modify, or destroy any database on this server — including future databases you create for other purposes. Store it in a password manager. Never share it, never paste it into chat, and definitely don't reuse it from another service.

3 Create a database and a user

Don't let Chordalia products connect as root — that account has too much power. Instead, create a dedicated database and a dedicated user with access only to that database.

On the host machine, open a terminal (Command Prompt on Windows) and connect to MariaDB as root:

mysql -u root -p

Enter the root password when prompted. You'll drop into a MariaDB [(none)]> prompt.

Commands to run

Copy and paste these lines one at a time, replacing YOUR_PASSWORD with a strong password of your choosing (different from the root password):

-- Create the database (UTF-8 four-byte, so emojis and all scripts work) CREATE DATABASE chordalia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Create a user that can connect from any machine on your network CREATE USER 'chordalia'@'%' IDENTIFIED BY 'YOUR_PASSWORD'; -- Grant full access to JUST this database (not any others) GRANT ALL PRIVILEGES ON chordalia.* TO 'chordalia'@'%'; -- Apply the changes FLUSH PRIVILEGES; -- Exit the shell EXIT;
Why 'chordalia'@'%' and not 'chordalia'@'localhost'? The % wildcard lets the user connect from any IP address on your network, which is what you want for multi-machine access. If you're only ever going to connect from the host machine itself, use 'chordalia'@'localhost' instead for tighter security.

4 Allow other machines to connect

Two things can block remote connections even after you've granted a user the right to connect:

Bind address

By default, MariaDB on some platforms only listens on the loopback interface (127.0.0.1), which means other machines can't reach it. To check and fix:

  1. Open the MariaDB config file. On Windows, it's usually C:\Program Files\MariaDB 11.x\data\my.ini. On Linux, /etc/mysql/my.cnf or /etc/mysql/mariadb.conf.d/50-server.cnf.
  2. Find the line bind-address = 127.0.0.1. If it's there, change it to bind-address = 0.0.0.0 (listen on all network interfaces). If it's commented out or absent, do nothing — the default already allows all interfaces.
  3. Save the file and restart the MariaDB service. On Windows, open Services (Win+R → services.msc), find the service named MySQL (the MariaDB installer registers its service under the MySQL name by default for backward compatibility — it may be named MariaDB if you picked a custom name during install). Right-click → Restart.

Windows Firewall

Windows blocks inbound connections to port 3306 by default. To open it:

  1. Win+R → wf.msc (opens Windows Defender Firewall with Advanced Security).
  2. Inbound RulesNew Rule…Port → Next.
  3. TCP, Specific local ports: 3306 → Next.
  4. Allow the connection → Next.
  5. Apply to Private (your home/office network) only. Do not tick Public. Next.
  6. Name it MariaDB (Chordalia) → Finish.
Never expose MariaDB to the public internet. Port 3306 on a public IP gets scanned and attacked within minutes. Keep the firewall rule restricted to Private networks, and don't port-forward 3306 on your router. If you need remote access from outside your network, use a VPN (Tailscale, WireGuard) rather than opening the port.

5 Test the connection from another machine

On a second machine (not the host), open a terminal and install the MariaDB client (on Windows, just grab the MSI from the same download page and choose Client programs only), then:

mysql -h <host-ip> -u chordalia -p chordalia

Replace <host-ip> with the IP address of the host machine (e.g. 192.168.1.50). Find it on the host by opening Command Prompt and running ipconfig — look for IPv4 Address under your active network adapter.

Enter the password you chose in Step 3. If you land at a MariaDB [chordalia]> prompt, you're done. Type EXIT; to close.

Host name instead of IP? Most home routers let you use the host machine's name directly (e.g. studio.local or just studio). That's nicer than an IP because it doesn't change if your router reassigns addresses. Check your router's admin page or try ping studio to see if it resolves.

Using MariaDB in your Chordalia product

Arion — Family / Archive

Open Settings → Database. Pick MariaDB as the backend, then paste:

  • Host → host IP or name (e.g. 192.168.1.50 or studio)
  • Port → 3306
  • Database → chordalia
  • User → chordalia
  • Password → the password from Step 3

Click Test connection. On success, click Save. Repeat on each other machine that should share this index.

Chordium

In chordium.yml (or the admin UI) set:

  • database.host
  • database.port3306
  • database.namechordalia (or your own)
  • database.user
  • database.password

Cadenzium

Open Settings → Database and pick MySQL/MariaDB. Fill in the same host, port, database, user, and password as above.

Chordalia products can safely share the same MariaDB server — each uses separate tables — but it's tidier to give each product its own database. Repeat Step 3 with a different database name (e.g. cadenzium, chordium) if you want that separation.

! Troubleshooting

"Can't connect to MySQL server on '{host}' (10060)" or "Connection timed out"

The client couldn't reach the host at all. Walk through these in order:

  1. On the host, is MariaDB running? Windows Services (services.msc) should show either MySQL or MariaDB as Running. (The MariaDB installer registers the service under the MySQL name by default.)
  2. Can the client reach the host on the network? From the client, run ping <host-ip>. If that doesn't respond, the machines aren't on the same network.
  3. Is Windows Firewall blocking port 3306? Temporarily turn off Windows Firewall on the host and retry; if it works, go back to Step 4 and create the firewall rule correctly.
  4. Is MariaDB listening on all interfaces? On the host, run netstat -an | find "3306" — if you see only 127.0.0.1:3306 LISTENING, the bind address is still loopback. Fix it per Step 4.

"Access denied for user 'chordalia'@'{host}' (using password: YES)"

The user exists but isn't allowed to connect from that IP address. Most likely you created the user with 'chordalia'@'localhost' instead of 'chordalia'@'%'. To fix, run (as root on the host):

CREATE USER 'chordalia'@'%' IDENTIFIED BY 'YOUR_PASSWORD'; GRANT ALL PRIVILEGES ON chordalia.* TO 'chordalia'@'%'; FLUSH PRIVILEGES;

"Incorrect string value" errors when indexing documents with special characters

The database was created with a character set other than utf8mb4. Drop and recreate it:

DROP DATABASE chordalia; CREATE DATABASE chordalia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON chordalia.* TO 'chordalia'@'%'; FLUSH PRIVILEGES;

(You'll need to re-run the product's initial indexing after this.)

How do I see how big my database is getting?

From the MariaDB shell:

SELECT table_schema AS db, ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS size_mb FROM information_schema.tables WHERE table_schema = 'chordalia' GROUP BY table_schema;

I forgot the root password

Stop the MariaDB service, start it with --skip-grant-tables, connect, reset the root password, restart normally. MariaDB's docs have the detailed procedure: mariadb.com/kb/en/resetting-the-root-password-on-windows →

How do I back up the database?

Run this from the host (creates a dump file):

mysqldump -u root -p --single-transaction chordalia > chordalia-backup.sql

Store the dump somewhere off the host machine. To restore, create an empty database and run mysql -u root -p chordalia < chordalia-backup.sql.