How to install phpmyadmin on Ubuntu?

How to install phpmyadmin on Ubuntu?

For correct operation of many web projects, database management systems (DBMS), for example, MySQL, are needed. However, interacting with the system exclusively using the MySQL command line is not always convenient.

Thanks to phpMyAdmin, users can control the MySQL system through a web interface. This manual contains step-by-step instructions for installing and protecting the phpMyAdmin web interface. When you will purchase offshore hosting from offshorededi you sure get 24/7 technical support like this.

Requirements.

  • Ubuntu 18.04 server configured by this manual (with sudo user and ufw configured).
  • LAMP stack (you can install it using this manual).
  • Let’s Encrypt certificate for Apache 9 can be obtained free of charge using the Let’s Create a Encrypt Certificate for Apache manual in Ubuntu 18.04)

When using programs like phpMyAdmin, be aware that it:

  • Interacts with MySQL directly;
  • Performs authentication using MySQL credentials;
  • Processes and returns results for arbitrary SQL queries.

For these reasons (and also because of its popularity and prevalence), this PHP application is often subjected to attacks by intruders. Therefore, under no circumstances can it be launched on a remote system via an HTTP connection. Without an SSL / TLS certificate for Apache web server, using phpMyAdmin is very dangerous.

1: Install phpMyAdmin

PhpMyAdmin packages are available in the standard Ubuntu repository.

Index and install phpMyAdmin:

  • sudo apt update
  • sudo apt install phpmyadminphp-mbstringphp-gettext

For the web server, select apache2.

When asked if you need to use dbconfig-common to tune the database, answer yes.

Then the program will offer to select and confirm the password for phpMyAdmin.

During installation, the phpMyAdmin configuration file is added to the / etc / apache2 / conf-enabled / directory, in which it is read automatically.

Enable the PHP mbstring extension now.

sudophpenmodmbstring

Restart Apache to update the settings:

sudosystemctl restart apache2

To open the interface, visit the following link in your browser:

https://domain_name_or_IP/phpmyadmin

To access the interface, use the name phpmyadmin and the administrator password you chose during installation.