DCAI — Derek Coleman & Associates Inc logoDCAI

Home / Support / MariaDB 11.4 on Ubuntu 24.04 LTS

MariaDB 11.4 on Ubuntu 24.04 LTS — Support & Quick Start

Production-ready MariaDB 11.4 LTS on Ubuntu 24.04. Drop-in MySQL-compatible database with a per-VM generated root password.

Fixed on image version 2026.916.1341 (published 2026-09-16)

First boot now authenticates its own `FLUSH PRIVILEGES` (it used to run unauthenticated and die with ERROR 1045), verifies `root` against the running server and only then writes /root/.mariadb-initial-password and the completion marker. The password survives reboots.

If you deployed this VM before 2026-09-16, it came from the older image and is not changed by the new publication — redeploy from the current Marketplace version, or apply the one-time repair below:

  1. On that image the root password in /root/.mariadb-initial-password applies on the FIRST boot only. If this VM has never been rebooted the file still holds the live password: sign in now with `mariadb -u root -p` and store it safely.
  2. Stop the old first-boot script from regenerating a password it can no longer apply, by writing the completion marker it failed to write (taken from the fixed script, not sweep-run).
  3. Already rebooted and the password was never stored? Reset root with MariaDB's documented `--init-file` procedure, or email support and we will walk you through it. MariaDB itself is running normally throughout.
sudo mkdir -p /etc/app && sudo touch /etc/app/.firstboot-complete

Image change: see the pull request.

Source: the Marketplace live version set for this offer, read from Partner Center on 2026-09-16. New deployments take the newest version by default.

At a glance

Application ports3306 (MariaDB) — listens on localhost (127.0.0.1) only until you open it (three steps in Quick start); ufw already allows 3306, the NSG keeps it closed
Admin credential filesudo cat /root/.mariadb-initial-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 mariadb`, no password
Service(s)mariadb
Configuration/etc/mysql/mariadb.conf.d/50-server.cnf (bind-address; ssl_cert / ssl_key for a CA-signed certificate)
Logsjournalctl -u mariadb -f; /var/log/mysql/error.log
VersionMariaDB 11.4 LTS (MariaDB repository)
PlatformUbuntu 24.04 LTS

Quick start

  1. SSH into the VM with the username and key you chose at deploy.
  2. MariaDB runs as the `mariadb` systemd service on port 3306, listening on localhost (127.0.0.1) only: nothing outside the VM can connect until you complete the three steps below. Connect locally with `mariadb -u root -p` using the generated password; images from 21 October 2026 onward make you set a new one first, or let you in with `sudo mariadb` (see First login below).
  3. To accept clients from another host — three deliberate steps, in this order (images from 2026.1004.2112 print them in the login message): (1) listen on the network: `sudo sed -i 's/^bind-address.*/bind-address = 0.0.0.0/' /etc/mysql/mariadb.conf.d/50-server.cnf && sudo systemctl restart mariadb`; (2) create an account for your client's address — root stays local-only: `CREATE DATABASE appdb; CREATE USER 'app'@'10.0.0.%' IDENTIFIED BY '<strong-password>'; GRANT ALL PRIVILEGES ON appdb.* TO 'app'@'10.0.0.%';`; (3) allow 3306 in the Azure NSG from that address only — never 0.0.0.0/0 (ufw on the VM already allows 3306/tcp).
  4. TLS is on by default: MariaDB 11.4 generates its own certificate at startup. For a CA-signed certificate set ssl_cert / ssl_key in /etc/mysql/mariadb.conf.d/50-server.cnf and restart MariaDB.

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

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 mariadb`, no password.

  1. Print the generated root password from the file.
  2. Connect locally with the password: `mariadb -u root -p` (root@localhost cannot sign in from another host).
  3. Images from 21 October 2026 onward (image version 2026.1021.227 or later): 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 mariadb` (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, so plain `sudo mariadb` is refused; change the root password yourself (ALTER USER).
  4. Create your application user and schema, and delete the file.

This is the MariaDB root password set at first boot. Connect with `mariadb -u root -p`. Images from 21 October 2026 onward make that first password sign-in set a new password (`SET PASSWORD = PASSWORD('…');`) and also let the OS root in with `sudo mariadb`, no password; on older images root is password-only (plain `sudo mariadb` is refused) — change the password with ALTER USER. Delete the file once the new 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 mariadb` is not affected.
`sudo mariadb` says access denied for root@localhostImages before 21 October 2026Root is password-only on those images: use `mariadb -u root -p` with the password from the file.

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.