Most businesses running a database-backed website — WordPress, Magento, a custom CMS, almost anything built with PHP — have phpMyAdmin installed somewhere. It is a free, browser-based tool for managing your MySQL database: browsing tables, running queries, importing and exporting data.
It is enormously useful. It is also one of the most commonly targeted paths on the internet.
What Is phpMyAdmin and Why Is It Dangerous?
phpMyAdmin is an open-source web application that provides a graphical interface to your MySQL or MariaDB database. Instead of connecting via command line, you point a browser at a URL — typically https://yourwebsite.co.uk/phpmyadmin/ — and get a full database management interface.
Many shared hosting control panels install it automatically. Many developers install it on production servers during setup and forget it is there.
The problem is straightforward: a publicly accessible phpMyAdmin installation is a direct path to your database — and automated scanners are probing for it constantly.
What Can an Attacker Do?
If your phpMyAdmin installation is publicly accessible and an attacker can log in — or if authentication is misconfigured — the consequences are severe:
Export your entire database. With a few clicks, an attacker can download your complete database: all customer records, order history, contact details, login credentials, and any other data your application stores. This is a reportable breach under UK GDPR.
Modify or delete data. An attacker could change prices on an e-commerce site, alter user roles to grant themselves administrator access, or drop all your tables entirely — destroying your database if you have no backups.
Write web shells to the server. In certain configurations, MySQL can write files to the server. An attacker with database access via phpMyAdmin may be able to write malicious PHP scripts to your web root, giving them full server access beyond the database alone.
Take over your application. WordPress, Magento, and most PHP applications store admin user credentials in the database. An attacker who can access phpMyAdmin can change the admin password directly, locking you out and giving themselves full control.
How Attackers Find phpMyAdmin
Automated scanners check common paths constantly:
/phpmyadmin//pma//mysql//db//admin/phpmyadmin/
Tools like Shodan maintain searchable indexes of publicly accessible phpMyAdmin installations. If yours is at any of these default locations, it will be found. Once found, attackers attempt default credentials (root with no password, admin/admin) or conduct brute force attacks.
In 2012, a series of attacks targeted exposed phpMyAdmin installations running outdated versions, exploiting a path traversal vulnerability (CVE-2012-4345) to execute arbitrary code. In the ransomware ecosystem, attackers who gain database access via phpMyAdmin have exported sensitive data, dropped all tables, and then demanded payment for return of the data — a double extortion tactic.
What to Do Next
- Remove phpMyAdmin from production. The most secure option is simply not to have it on a public-facing server. Use MySQL Workbench or TablePlus to connect via SSH tunnelling — secure, encrypted, and not publicly accessible. Your hosting control panel (cPanel, Plesk) often provides database access tools behind your hosting account’s own authentication.
- Restrict by IP address if you must keep it. Configure your web server or hosting firewall so phpMyAdmin is only accessible from your specific IP address. In Apache, use a
<Directory>block withAllow from YOUR.IP.ADDRESS.HERE. - Move it to a non-standard URL. Changing the installation path from the default to something unpredictable eliminates most automated scans, though it is not a substitute for proper access controls.
- Add HTTP Basic Authentication. A second authentication layer in front of phpMyAdmin — requiring a username and password before the phpMyAdmin login page is even shown — creates two layers of protection.
- Keep phpMyAdmin updated. Ensure you always run the latest version, and that the MySQL user it connects with has the minimum permissions needed — not root access to all databases.
W3IT’s free security check tests for accessible phpMyAdmin installations at common paths on your domain. Run it now to see whether your database management interface is exposed to the internet.