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
:80behind 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.1only (the loopback interface, 127.0.0.1:3306), never exposed to the network - A dedicated Azure data disk at
/var/lib/mysqlfor all databases nginx.service,php8.3-fpm.serviceandmariadb.serviceas enabled systemd units- An unauthenticated
/healthzendpoint 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 StandardOpen port 80 for the web interface:
az vm open-port --resource-group <your-rg> --name phpmyadmin --port 80Step 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-firstbootss -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.txtSign 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 -1php -v | head -1mariadb --versioncurl -sI http://127.0.0.1/healthz | head -1Step 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 -1findmnt -no SOURCE,TARGET,FSTYPE /var/lib/mysqlConnecting 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.1only 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.txtprotected, and rotate the password if you share access. - Restrict inbound access. Limit inbound
80/tcpin 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
Overview
phpMyAdmin is the most widely used web interface for administering MySQL and MariaDB databases from a browser. From phpMyAdmin you can browse and edit tables, run SQL, import and export data, and manage user accounts and privileges without a desktop client.
This SecureAnyCloud image ships phpMyAdmin as a self-contained appliance with its own bundled MariaDB server, so it is useful on its own and is not just a client waiting for an external database. phpMyAdmin runs as a PHP application. nginx answers on port 80 (and 443 once you add TLS) and passes requests to php-fpm over a local socket. phpMyAdmin talks to the bundled MariaDB server over the loopback interface.
What you get:
- A bundled MariaDB server that listens on
127.0.0.1:3306only and is never exposed to the network by the image. The instance security group opens SSH, HTTP and HTTPS but not the database port. - The MariaDB data directory on a dedicated EBS data volume mounted at
/var/lib/mysql, independently resizable and separate from the operating system disk - phpMyAdmin's own program code on the OS disk at
/usr/share/phpmyadmin - A one-shot first-boot service that generates a fresh MariaDB root password unique to each instance, hardens the database, generates a unique cookie-authentication secret and sets up the phpMyAdmin configuration storage
- The credentials written to
/root/phpmyadmin-credentials.txtwith mode 0600, and no shared or default database password in the image - 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, you need:
- An AWS account with permission to launch EC2 instances and subscribe to AWS Marketplace products
- An EC2 key pair in your target region for SSH access
- A security group that allows inbound TCP 22 (SSH), 80 (HTTP) and, if you add TLS, 443 (HTTPS) from your address. The bundled MariaDB port 3306 does not need to be opened, because it is loopback-only.
- An SSH client and a web browser to reach the console
Launch the instance
You can launch the instance from the AWS Marketplace console or the AWS CLI.
From the AWS Marketplace, open the product page and choose Continue to Subscribe. Accept the terms, and then choose Continue to Configuration and Continue to Launch. Pick your region, instance type, key pair and the security group described in the prerequisites, and launch.
From the AWS CLI, launch the AMI directly. Replace the values in angle brackets with your own:
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type t3.small \
--key-name <your-key-pair> \
--security-group-ids <security-group-id> \
--subnet-id <subnet-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=phpmyadmin}]'t3.small is a comfortable starting size for the console plus a bundled database. Move to a larger instance type for heavier workloads. The data directory is on its own EBS volume, so you can resize storage independently of the instance.
Connect to your instance
Connect over SSH as the default login user for your operating system variant. On Ubuntu 24.04, the login user is ubuntu:
ssh -i <your-key.pem> ubuntu@<public-ip>Retrieve the sign-in password
On first boot, the image generates a MariaDB root password unique to this instance. It records the password, along with the phpMyAdmin control-user password, in a root-only file. Read the file over SSH:
sudo cat /root/phpmyadmin-credentials.txtThe output looks like this. The passwords are unique to your instance.
PHPMYADMIN_URL=http://<public-ip>/ PHPMYADMIN_LOGIN_USER=root ROOT_USER=root ROOT_PASSWORD=<ROOT_PASSWORD> CONTROL_USER=pma CONTROL_PASSWORD=<CONTROL_PASSWORD> PORT=3306Sign in to phpMyAdmin as root with the ROOT_PASSWORD value. The pma control user backs phpMyAdmin's configuration storage, and you do not sign in with it.
First sign-in
Open phpMyAdmin in your browser at http://<public-ip>/. Sign in with the username root and the ROOT_PASSWORD from the credentials file.
The databases overview
After you sign in, you land on the phpMyAdmin home page. The left navigation lists the databases on the bundled MariaDB server, and the main panel shows server and web-server information and general settings. The phpMyAdmin configuration storage is already set up, so relational features, bookmarks and query history work without a setup warning.
To create a database, click Databases in the top tab bar, enter a name and collation (for example utf8mb4_unicode_ci), and click Create.
Browse and edit tables
Click a database in the navigation tree, and then click a table to browse its rows in a spreadsheet-style grid. You can edit and delete rows inline, copy rows, sort by column, filter, and page through large tables. The Structure tab lets you add, change and drop columns, indexes and foreign keys.
Use Insert to add rows through a form. Use Import and Export to load and dump data in SQL, CSV, JSON and other formats.
Run SQL
Click the SQL tab to write and run SQL with syntax highlighting. Type a query and click Go, or press Ctrl+Enter. Results appear below the editor with query history. You can export the result set, create a view or draw a quick chart.
Manage users and privileges
Click User accounts in the top tab bar to create database users, set their passwords and host scope, and grant or revoke privileges globally or per database. Use this page to add an application user for your own database, rather than connecting your application as root.
Point phpMyAdmin at additional servers
The image ships a bundled MariaDB server for immediate use, and phpMyAdmin can also administer any reachable MySQL or MariaDB server. To add another server, edit /usr/share/phpmyadmin/config.inc.php and append a second server block, for example:
$i++; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['host'] = 'db2.internal.example'; $cfg['Servers'][$i]['AllowNoPassword'] = false;After you save the file, a server chooser appears on the sign-in page so you can pick which server to administer.
The bundled MariaDB server
The bundled database is configured for local use by the console:
- It listens on
127.0.0.1:3306only. The instance security group does not expose 3306, so you can reach the database from phpMyAdmin and from an SSH session on the instance, but not from the network. - Its data directory is on a dedicated EBS volume mounted at
/var/lib/mysql, so you can snapshot, back up and grow storage independently of the OS disk.
You can also work with the database directly over SSH using the mariadb client. It prompts for the root password from the credentials file:
sudo mariadb -u root -pCheck that the services are running and that the database listens only on loopback:
systemctl is-active mariadb php8.3-fpm nginx ss -tln | grep 3306The health endpoint answers without authentication for load-balancer and uptime checks:
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1/healthzAdd HTTPS (optional)
The image serves plain HTTP on port 80 so that it works immediately. For production, put phpMyAdmin behind TLS. The simplest route is a certificate from Let's Encrypt. You need a DNS name that points at the instance and port 443 open in the security group:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.comCertbot installs the certificate into the nginx site and sets up automatic renewal.
Back up and maintain
- Database backups. Dump databases with
sudo mariadb-dump --all-databases > backup.sql, or snapshot the/var/lib/mysqlEBS volume from the EC2 console for a full point-in-time copy. - Credentials. The per-instance passwords are in
/root/phpmyadmin-credentials.txt. Store them in your secrets manager. For shared environments, rotate the root password and create scoped application users. - Updates. Keep the operating system current with
sudo apt-get update && sudo apt-get upgrade.
Support
SecureAnyCloud publishes this image and provides 24/7 technical support by email and chat. We can help with deployment, database and user administration, import and export, connecting phpMyAdmin to additional database servers, storage tuning, and backup and upgrade planning. Contact sales@secureanycloud.com.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch phpMyAdmin on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com