How to install phpMyAdmin to manage MySQL from the browser
Updated 10/23/2026
phpMyAdmin lets you view and edit MySQL databases from a browser, without the command line. Here is how to install it safely.
1. Install
apt-get update -y
apt-get install -y phpmyadmin
When prompted, choose the web server (Apache) or configure it manually for Nginx via a symlink:
ln -s /usr/share/phpmyadmin /var/www/mysite/phpmyadmin
2. Securing it, mandatory
phpMyAdmin is a frequent target. Protect it:
- Serve it only over HTTPS (see Let's Encrypt).
- Add an extra password at the web server level (basic auth).
- Do not use the MySQL root account; create a dedicated user (see MySQL users and privileges).
- Ideally, restrict access to your own IP.
A lighter alternative
For a single file, no install, you can use Adminer (adminer.php), which offers the same functionality much more simply.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How to optimize Nginx performance: gzip, cache and HTTP/2
Make your site faster with gzip compression, static file caching and HTTP/2, a few lines of config.
Updated 10/23/2026Web serversHow to deploy a Node.js app to production
Run a Node.js app reliably in production with PM2 and Nginx, with auto-restart and HTTPS.
Updated 10/23/2026Web serversHow to host multiple sites on one server
Use Nginx server blocks to run multiple domains on the same VPS, each with its own site.
Updated 10/23/2026