Deployment guide

MariaDB phpMyAdmin

Overview

MariaDB is one of the most widely deployed open source relational databases and a drop-in replacement for MySQL. It serves as the SQL backend for web, application and transactional workloads. This SecureAnyCloud image pairs a MariaDB 10.11 server with phpMyAdmin, the standard browser-based administration console. The database is fully manageable the moment it boots, with no local client to install.

From an ordinary browser you can create and edit databases and tables, run SQL, import and export data, and manage users and privileges. nginx and PHP 8.3 FPM serve phpMyAdmin 5.2.3 on a hardened Ubuntu 24.04 LTS base, patched at build time.

The MariaDB server listens only on the loopback interface (127.0.0.1:3306) and keeps its data on a dedicated Azure data disk. The first boot of every VM generates a unique database root password, a phpMyAdmin control database and a random blowfish secret. There is no default login.

What you get:

  • MariaDB 10.11 server as the primary database, with data on a dedicated Azure disk
  • phpMyAdmin 5.2.3 served by nginx and PHP 8.3 FPM, managed by systemd
  • The phpMyAdmin web console on :80 with cookie authentication
  • A per-VM MariaDB root password, generated on first boot and recorded in a root-only file
  • The phpMyAdmin configuration storage (control database) fully set up, so there is no setup warning
  • MariaDB bound to 127.0.0.1 only, never exposed to the network
  • A dedicated Azure data disk at /var/lib/mysql for all databases
  • mariadb.service, nginx.service and php8.3-fpm.service as enabled systemd units
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • 24/7 SecureAnyCloud support

Prerequisites

Before you deploy this image, you need:

  • An active Azure subscription
  • An SSH key pair
  • A VNet and subnet in the target region
  • An NSG that allows inbound 22/tcp from your management network and 80/tcp for the web console

Standard_B2s (2 vCPU / 4 GiB RAM) is a sensible starting point. Size up for larger databases or heavier query loads.

phpMyAdmin serves plain HTTP on port 80. For production, terminate TLS in front of it with your own domain. The MariaDB server is never exposed. It listens on 127.0.0.1 only, so port 3306 stays off the network.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, and search the Marketplace for MariaDB with phpMyAdmin by SecureAnyCloud. Select Create.

  • On Basics, pick your subscription, resource group, region and size.
  • Under Administrator account, choose SSH public key and paste your key.
  • Under Inbound port rules, allow SSH (22) and HTTP (80).
  • On the Disks tab, review the dedicated data disk.

Then choose Review + create, followed by Create.

Step 2 - Deploy from the Azure CLI

Accept the Marketplace terms once per subscription. You must do this before your first CLI deploy. Then create the VM:

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:mariadb-phpmyadmin-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name mariadb-phpmyadmin \
  --image sac1647283583153:mariadb-phpmyadmin-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Then open port 80 for the web console:

az vm open-port --resource-group <your-rg> --name mariadb-phpmyadmin --port 80

Step 3 - Confirm the services are running

SSH in as azureuser and confirm that MariaDB, nginx and PHP FPM are all active. MariaDB listens only on 127.0.0.1:3306, while nginx serves the web console on port 80.

systemctl is-active mariadb nginx php8.3-fpm mariadb-phpmyadmin-firstboot
ss -tlnp | grep -E ':80 |:3306 ' | sed 's/ */ /g'

Step 4 - Retrieve the per-VM database password

Every VM generates its own MariaDB root password on first boot. It writes the password, along with the login user and URL, to a root-only credentials file. Read the file with sudo:

sudo cat /root/mariadb-phpmyadmin-credentials.txt

Sign in to phpMyAdmin as user root with the PHPMYADMIN_ROOT_PASSWORD from this file. On the VM itself, you can also run sudo mariadb to reach the database directly over the local socket without a password.

Step 5 - Sign in to phpMyAdmin

Browse to http://<vm-public-ip>/ and sign in with username root and the password from Step 4. phpMyAdmin uses cookie authentication, so the per-VM blowfish secret protects your session.

After you sign in, you land on the MariaDB server overview. The Databases tab lists every database on the server, with its collation and a link to check privileges.

Step 6 - Browse tables and run SQL

Select a database in the left navigation to expand its tables. Click a table to browse its rows. The Browse view shows the data with inline edit, copy and delete actions. It also lets you sort, search and page through large tables.

The SQL tab gives you a full query editor with syntax highlighting. Type any statement and click Go to run it. Results appear below, with options to export, chart or save the query.

You can do the same from the command line on the VM. Read the root password from the credentials file and list the databases over the loopback interface:

PW=$(sudo grep '^PHPMYADMIN_ROOT_PASSWORD=' /root/mariadb-phpmyadmin-credentials.txt | cut -d= -f2-); mysql -h127.0.0.1 -uroot -p"$PW" -e 'SHOW DATABASES;'

Step 7 - Verify the stack

Confirm the MariaDB version, the phpMyAdmin and PHP versions, the health endpoint and the phpMyAdmin control database. The control database is the configuration storage that removes the setup warning.

mariadb --version
grep -oE "VERSION = '[0-9.]+'" /usr/share/phpmyadmin/libraries/classes/Version.php | head -1
php -v | head -1
curl -sI http://127.0.0.1/healthz | head -1

Step 8 - Check where your data lives

All MariaDB databases live on a dedicated Azure data disk mounted at /var/lib/mysql. Your data stays separate from the operating system disk and rides with the VM. Confirm the mount:

df -h /var/lib/mysql | tail -1
findmnt -no SOURCE,TARGET,FSTYPE /var/lib/mysql

Administering additional servers

The image is preconfigured for the local MariaDB server, but phpMyAdmin can also administer other MySQL and MariaDB servers. Add a second server block to /usr/share/phpmyadmin/config.inc.php with the remote host. Then reload the login page and pick the server from the dropdown.

Make sure the remote database allows connections from this VM and that any firewalls or NSGs permit the traffic.

Security notes

  • phpMyAdmin serves plain HTTP on port 80. For anything beyond a trusted network, put it behind your own TLS-terminating reverse proxy or Azure Application Gateway with a certificate for your domain.
  • The MariaDB server listens on 127.0.0.1 only and is never reachable from the network. Administer it through phpMyAdmin or over SSH.
  • The root password is unique to each VM. Keep /root/mariadb-phpmyadmin-credentials.txt protected, and rotate the password if you share access.
  • On the VM, sudo mariadb reaches the database over the local unix socket as root. There is no default credential that works over the network.
  • Restrict inbound 80/tcp in your NSG to the networks that need the web console.

Support

SecureAnyCloud maintains this image and provides 24/7 support. If you need help deploying or operating MariaDB with phpMyAdmin on Azure, contact us at secureanycloud.com.

Deploy on Azure

Launch MariaDB with phpMyAdmin on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure