How to install phpMyAdmin to manage MySQL from the browser
Updated 7/20/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 7/20/2026Web serversHow to host a static site or a React/Vue app
Publish a static site or a React/Vue build on Nginx, with correct routing for single-page apps.
Updated 7/20/2026Web serversHow to deploy a Laravel app to production
Deploy Laravel properly on a VPS: Nginx, PHP-FPM, permissions, optimizations and the queue worker.
Updated 7/20/2026