Using phpMyAdmin to Manage Databases

Using phpMyAdmin to Manage MySQL/MariaDB Databases

phpMyAdmin is a browser-based interface for managing MySQL and MariaDB databases — useful for importing/exporting data, running queries, and managing users without the command line.

Install phpMyAdmin (Ubuntu/Debian)

apt install phpmyadmin -y

During installation, select your web server (Apache or Nginx) and configure the database with dbconfig-common.

Manual Installation (Nginx)

cd /var/www
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
tar -xzf phpMyAdmin-latest-all-languages.tar.gz
mv phpMyAdmin-*-all-languages phpmyadmin
chown -R www-data:www-data phpmyadmin

Create an Nginx location block or virtual host pointing to /var/www/phpmyadmin.

Security: Restrict Access by IP

Add this to your Nginx config for the phpMyAdmin location:

location /phpmyadmin {
    allow 203.0.113.100;   # Your IP only
    deny all;
    root /var/www;
}

Key Features

  • Create, browse, edit, and delete databases and tables
  • Run SQL queries in a browser-based editor
  • Import and export databases as SQL, CSV, or other formats
  • Manage database users and privileges
  • View and modify table structure

Security Recommendations

  • Never expose phpMyAdmin on a public URL without IP restrictions or HTTP basic auth
  • Use a non-obvious URL path (e.g., /dbadmin-a7x2/ instead of /phpmyadmin/)
  • Keep phpMyAdmin updated
  • Use a dedicated MySQL user with limited privileges rather than root
  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

Installing cPanel & WHM

Installing cPanel & WHM cPanel is one of the most popular web hosting control panels. It...

Getting Started with Webmin

Getting Started with Webmin Webmin is a free, open-source web-based control panel for Linux...

Installing HestiaCP

Installing HestiaCP HestiaCP is a free, open-source web hosting control panel — the most actively...

Installing Cockpit — Web-Based Server Manager

Installing Cockpit Cockpit is a lightweight, browser-based server management interface built into...

Setting Up Nginx Proxy Manager

Setting Up Nginx Proxy Manager Nginx Proxy Manager (NPM) is a Docker-based GUI for managing...