How to install phpMyAdmin to manage MySQL from the browser
Updated 10/16/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 deploy a Laravel app to production
Deploy Laravel properly on a VPS: Nginx, PHP-FPM, permissions, optimizations and the queue worker.
Updated 10/16/2026Web serversHow 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/16/2026Web serversHow to force HTTPS and redirect HTTP
After installing SSL, make sure every visitor uses HTTPS, with a permanent 301 redirect from HTTP.
Updated 10/16/2026