
Deploy phpMyAdmin + MySQL | (Just Updated) Fixes the Apache Crash Loop
Fixes the Apache MPM crash loop and keeps logins alive across redeploys.
phpmyadmin
Just deployed
/sessions
mysql
Just deployed
/var/lib/mysql
Deploy and Host phpMyAdmin + MySQL on Railway
A working phpMyAdmin 5.2.3 web console with its own MySQL 9.4 database, in one deploy. The MySQL data directory and the phpMyAdmin session store are both on Railway volumes, and the admin credentials are generated for you — there is nothing to fill in on the deploy form.
About Hosting phpMyAdmin + MySQL
Two services. MySQL 9.4 stores its data on a volume and is published on a Railway TCP
proxy so your own applications can connect to it; its InnoDB buffer pool is sized from
the container's actual memory limit rather than MySQL's fixed 128 MB default.
phpMyAdmin runs from a wrapper image that fixes three things the stock image does not
handle on Railway: it removes the duplicate Apache MPM module that otherwise aborts
Apache at start with More than one MPM loaded, it binds Apache to the port Railway
injects, and it pins the phpMyAdmin blowfish secret while keeping PHP's session files
on a volume — so a redeploy no longer signs everyone out mid-task. The phpMyAdmin
configuration storage database and its control user are created automatically on first
boot, which enables bookmarks, query history, column comments and designer layouts.
Both services carry a real healthcheck, so a broken boot is reported as a failed
deploy instead of a green one.
Why Deploy phpMyAdmin + MySQL on Railway?
Railway gives you a public HTTPS URL for the console, a TCP proxy for the database, and managed volumes for both — the whole stack a small MySQL project needs, with no VM, no Apache configuration and no TLS certificates to manage. The root password and the phpMyAdmin secrets are generated per deploy, so nothing is shared between deploys and no credential is typed into a form.
Common Use Cases
- A browser admin console for a MySQL database you already run on Railway.
- A quick managed MySQL instance plus a GUI for prototyping, imports and one-off queries.
- A shared database browser for a small team, reachable by URL with no client install.
Dependencies for phpMyAdmin + MySQL
- phpMyAdmin 5.2.3 (pinned), running on Apache with PHP 8.3.
- MySQL 9.4 (pinned).
Deployment Dependencies
- None beyond the two services in this template. MySQL is deployed as part of the template; no external database or cache is required.
Template Content
phpmyadmin
ghcr.io/bon5co/phpmyadmin-railway:5.2.3mysql
mysql:9.4