phpMyAdmin is a web application written in PHP that allows you to administer MySQL databases through a browser.
The easiest way to install phpMyAdmin is to download the archive with the latest version from the official website www.phpmyadmin.net and unpack it into the desired www directory, then you can open http://HOST/phpmyadmin/setup/ in the browser and follow the instructions. After that, move the config.inc.php file to the phpmyadmin root directory and close access to /setup/ or delete it altogether.
Most likely you will need to install some extensions, for example php-mcrypt.
In the case of installation in Linux, I recommend performing the installation with the commands below, in this case everything is installed automatically and will be updated later when the system is updated or by running the same installation command.
System update commands:
sudo aptitude update sudo aptitude upgrade
Installing on Linux Ubuntu:
sudo apt-get install phpmyadmin
Installation on CentOS:
sudo yum install phpmyadmin
During installation, you will need to enter the mysql root user password and create a new user password that will be created with the phpmyadmin database, as well as select which web server is used.
The web files will be located in the /usr/share/phpmyadmin directory
If during the installation apache2 was selected, then the link /etc/apache2/conf.d/phpmyadmin.conf to the /etc/phpmyadmin/apache.conf file is created in which the alias /phpmyadmin is registered to the /usr/share/phpmyadmin directory, There is a way to access phpmyadmin from any domain and ip that are tied to the server by typing http://HOST/phpmyadmin in the browser.
To restrict access to phpMyAdmin, you need to open one of the paths below the phpmyadmin.conf file in a text editor:
sudo nano /etc/apache2/conf.d/phpmyadmin.conf sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
And in the Directory block below, add two lines with the list of IP addresses from which you can open phpMyAdmin:
<Directory /usr/share/phpmyadmin> ... Order Allow,Deny Allow from 192.168.2.4 192.168.10.0/24 ... </Directory>