phpMyAdmin is readily available in apt's repository thus can easily be installed from the command line. Installing phpMyAdmin via apt will also install Apache and PHP and all the required modules. php-mysql and mysql-client will also be installed, but the mysql-server itself is not.

Steps to install phpMyAdmin on Ubuntu or Debian:

  1. Update apt's package list.
    $ sudo apt update
  2. Install and configure phpmyadmin package via apt.
    1. Install phpmyadmin.
      $ sudo apt install --assume-yes phpmyadmin
    2. Choose your web server of choice and click Ok.

      use <tab> to navigate

    3. Configure database for phpmyadmin with dbconfig-common.

      Just select Yes if unsure.

    4. Provide password for phpmyadmin access
    5. Provide root password for your MySQL or MariaDB installation.
  3. Edit configuration files for further configuration if necessary

    Apache configuration file.


    phpMyAdmin configuration file.

  4. Access phpMyAdmin from web browser.
Discuss the article:

Comment anonymously. Login not required.