Home / Support / MariaDB on AlmaLinux 9
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.
| Application ports | 3306 (MySQL protocol) — opened in firewalld at first boot |
|---|---|
| Admin credential file | 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 |
| Service(s) | mariadb |
| Configuration | /etc/my.cnf.d/mariadb-server.cnf |
| Logs | journalctl -u mariadb -f; /var/log/mariadb/mariadb.log |
| Version | MariaDB (AlmaLinux 9 AppStream package) |
| Platform | AlmaLinux 9 |
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-passwordSign 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.
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.
| Symptom | Check | Fix |
|---|---|---|
| MariaDB answers ERROR 1820 "You must SET PASSWORD before executing this statement" | Images from 21 October 2026 onward, until root's first password change | Run `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 directory | Your VM came from an image before 21 October 2026 | Those images keep the password in /var/lib/mysql/.root-password: `sudo cat /var/lib/mysql/.root-password`. |
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.