Deployment guide

phpMyAdmin

Overview

phpMyAdmin is the most widely used web interface for administering MySQL and MariaDB databases. From an ordinary browser you can browse and edit tables, run SQL, import and export data, manage users and privileges, and monitor the server, with no local client to install.

This SecureAnyCloud image serves phpMyAdmin 5.2.3 with nginx and PHP 8.3 FPM on a hardened Ubuntu 24.04 LTS base, patched at build time. It includes a bundled local MariaDB server, so the appliance is useful on its own. A unique database root password, a phpMyAdmin control database and a random blowfish secret are generated on the first boot of every VM.

What you get:

  • phpMyAdmin 5.2.3 served by nginx and PHP 8.3 FPM, managed by systemd
  • A bundled MariaDB 10.11 server, the database phpMyAdmin administers out of the box
  • The phpMyAdmin web interface on :80 behind an nginx reverse proxy, 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 no setup warning appears
  • MariaDB bound to 127.0.0.1 only (the loopback interface, 127.0.0.1:3306), never exposed to the network
  • A dedicated Azure data disk at /var/lib/mysql for all databases
  • nginx.service, php8.3-fpm.service and mariadb.service as enabled systemd units
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Standard_B2s (2 vCPU / 4 GiB RAM) is a sensible starting size. Choose a larger size for bigger databases or heavier query loads.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the web interface. phpMyAdmin serves plain HTTP on port 80, so for production, terminate TLS in front of it with your own domain. The bundled MariaDB 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, search the Marketplace for phpMyAdmin by SecureAnyCloud, and select Create.

On the Basics tab, 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).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

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

Open port 80 for the web interface:

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

Step 3 - Confirm the services are running

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

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

Step 4 - Retrieve the per-VM database password

Each VM generates its own MariaDB root password on first boot. The password, the login user and the URL are written to a root-only credentials file. Read it with sudo:

sudo cat /root/phpmyadmin-credentials.txt

Sign in to phpMyAdmin as user root with the PHPMYADMIN_ROOT_PASSWORD from this file. On the VM itself, 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 server overview. The Databases tab lists every database on the bundled MariaDB 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, then click a table to browse its rows. The Browse view shows the data with inline edit, copy and delete actions, and lets you sort, search and page through large tables.

The SQL tab opens a full query editor with syntax highlighting. Type a 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/phpmyadmin-credentials.txt | cut -d= -f2-); mysql -h127.0.0.1 -uroot -p"$PW" -e 'SHOW DATABASES;'

Step 7 - Verify the stack

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

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

Step 8 - 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 travels with the VM. Confirm the mount:

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

Connecting phpMyAdmin to additional servers

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

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

Security notes

  • Encrypt web traffic. phpMyAdmin serves plain HTTP on port 80. For anything beyond a trusted network, put it behind your own TLS-terminating reverse proxy or an Azure Application Gateway with a certificate for your domain.
  • Keep MariaDB private. It listens on 127.0.0.1 only and is never reachable from the network. Administer it through phpMyAdmin or over SSH.
  • Protect the root password. The per-VM root password is unique to each VM. Keep /root/phpmyadmin-credentials.txt protected, and rotate the password if you share access.
  • Restrict inbound access. Limit inbound 80/tcp in your NSG to the networks that need the web interface.

Support

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

Deploy on Azure

Launch 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