DCAI — Derek Coleman & Associates Inc logoDCAI

Home / Support / MariaDB on AlmaLinux 9

MariaDB on AlmaLinux 9 — Support & Quick Start

MariaDB on AlmaLinux 9 — MariaDB on AlmaLinux 9: the community-driven MySQL-compatible database on an enterprise-grade RHEL-compatible base. Published by Derek Coleman & Associates Inc on the Azure Marketplace, deployed in your own Azure subscription.

At a glance

Application ports3306 (MySQL protocol) — opened in firewalld at first boot
Admin credential filesudo cat /root/.mariadb-initial-password # images from 21 October 2026 onward; older images: sudo cat /var/lib/mysql/.root-password
Sign in asroot (root@localhost only): with the generated password, or on images from 21 October 2026 onward also as the OS root with `sudo mysql`, no password
Service(s)mariadb
Configuration/etc/my.cnf.d/mariadb-server.cnf
Logsjournalctl -u mariadb -f; /var/log/mariadb/mariadb.log
VersionMariaDB (AlmaLinux 9 AppStream package)
PlatformAlmaLinux 9

Quick start

  1. Deploy from the Azure Marketplace (Get It Now → Create), choosing your SSH key at the Administration step.
  2. Allow inbound SSH (22) for yourself plus the application port(s): 3306 (MySQL protocol) — to your application subnets only — restrict to your own IP where possible. The in-image firewall already allows them; only the Network Security Group (NSG) keeps them closed.
  3. Connect locally with `mysql -h 127.0.0.1 -u root -p` using the generated password (images from 21 October 2026 onward make you set a new one first; see First login below), then create your application user and schema.
  4. Remote clients: MariaDB listens on all interfaces; firewalld already allows 3306, so scope the NSG rule tightly.

First login / credentials

This image generates its admin credential on the VM at first boot — nothing is pre-set. SSH into the VM with the username + key you chose at deploy, then print the generated credential:

ssh <your-username>@<VM-IP>
sudo cat /root/.mariadb-initial-password   # images from 21 October 2026 onward; older images: sudo cat /var/lib/mysql/.root-password

Sign in as root (root@localhost only): with the generated password, or on images from 21 October 2026 onward also as the OS root with `sudo mysql`, no password.

  1. Print the generated root password (first boot sets it and removes anonymous users and the test database). Images from 21 October 2026 onward (image version 2026.1021.229 or later) keep it in /root/.mariadb-initial-password, readable by root only, and show these sign-in steps in the SSH login message (MOTD). Older images keep it in /var/lib/mysql/.root-password inside the data directory, where the mysql service account can read it too.
  2. Connect locally with the password: `mysql -h 127.0.0.1 -u root -p` (root@localhost cannot sign in from another host).
  3. Images from 21 October 2026 onward: that first password sign-in must set a new password before anything else — `SET PASSWORD = PASSWORD('NEW-PASSWORD');` — and every other statement answers ERROR 1820 until you have. `sudo mysql` (the OS root over the local socket, no password) keeps working and is not held. On older images root signs in with the password only: change it yourself (ALTER USER).
  4. Create your application user and schema, and delete the file.

Images from 21 October 2026 onward: the root password is in /root/.mariadb-initial-password, your first password sign-in must set a new one (`SET PASSWORD = PASSWORD('…');`), and `sudo mysql` works without a password. Older images: the password is in /var/lib/mysql/.root-password (the mysql service account can read it too); change it after the first sign-in. Delete the file once the password is stored securely.

Troubleshooting

SymptomCheckFix
MariaDB answers ERROR 1820 "You must SET PASSWORD before executing this statement"Images from 21 October 2026 onward, until root's first password changeRun `SET PASSWORD = PASSWORD('NEW-PASSWORD');` in that session, then carry on with the new password. `sudo mysql` is not affected.
`sudo cat /root/.mariadb-initial-password` says No such file or directoryYour VM came from an image before 21 October 2026Those images keep the password in /var/lib/mysql/.root-password: `sudo cat /var/lib/mysql/.root-password`.

Still stuck?

Email support@dcassociatesgroup.com (response within 1 business day) or send a message via the contact form. Include the offer name, VM size, region, and any log output — sudo journalctl -u <service> -n 100 usually tells the story.