phpMyAdmin is a web interface for easy management of the MySQL DBMS, running SQL commands and viewing the contents of server databases. It is an open-source software product, that is, an open-source application. The capabilities of this web interface are very wide:
And with all that, phpMyAdmin supports multi-user use, which makes this application incredibly versatile and convenient. In this article, we will tell you how to install phpMyAdmin on your computer and server.
Preconfiguring your computer involves installing and configuring three key components:
Also, make sure that your computer is connected to the server via a secure protocol SSH, otherwise, you risk the security of the server.
When all these steps are made, proceed directly to the installation of phpMyAdmin on your computer. Go to the official website, there you will see a large list of current versions - choose the appropriate and download. Then:
Now, when you type http://localhost into the address bar, it will take you to the login page of the phpMyAdmin web interface.
The sequence of steps for installing the application will be different, depending on the operating system used. The general requirements are identical - connect only via a secure tunnel, and you will also need to install and configure the main server software beforehand - PHP, MySQL, and the Apache or Nginx web server. Below we will provide guidance for the three most popular operating systems.
Before proceeding to the installation, you need to check whether the server extension PHP is installed, because without it you can not edit text strings in Unicode. At the command line write:
sudo apt install php-mbstring
Once the update is complete, you can proceed directly to install the web interface. To do this, enter the command:
sudo apt install phpmyadmin
You will see an installer window where you can choose between two web servers to automatically reconfigure - apache2 and lighttpd. Choose apache2 and confirm with the space bar.
The next step will require you to create a database for the software you are installing - just agree and go on. The installer will ask you to think of a password for the new profile - preferably a complex one. Try to use letters in different case, numbers, and symbols. The combination should be somewhere to write down on a piece of paper or put in the password manager.
To complete the installation of phpMyAdmin on the server you need to enable two important extensions with the commands:
sudo phpenmod mcrypt
sudo phpenmod mbstring
Enter them one by one and then the server must be restarted. Use a special request:
sudo systemctl restart apache2
Done, phpMyAdmin on Ubuntu is installed and ready to go.
Before installation, you will need to pre-deploy to the server complex LAMP, which includes 4 components:
If these components are not already on the server, after installing Debian from the command line, type the following:
apt install nginx php-fpm mysql-server
The installation will take some time and then you can proceed with the configuration. We recommend installing an SSL/TLS certificate for security, so you can encrypt the traffic being transmitted.
It should be stressed that many popular programs and components are missing from the Debian repositories, so the phpMyAdmin item needs to be attached manually. To do this open sources.list with the editor. Scroll down to the bottom and add two lines at the very end of the contents:
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch main contrib non-free
Confirm saving the changes and go back. The next step is to update the MySQL database. Use the command:
apt-get install phpmyadmin
In the window that appears, confirm the selected web server, and then you will get to a window asking if you want to allow the use of "dbconfig-common". Using this option is required to configure the database and the user with administrator privileges within the application phpMyAdmin, so we confirm.
It remains a small thing - come up with a complex password, enter it and complete the installation. When all components are installed, you can get to work. Verification can be done by going to the virtual domain.
As in the previous two cases, the first thing to do is to install the Apache web server and PHP. Then install the EPEL repository with this command:
yum install epel-release
This gives you access to the package containing the installer phpMyAdmin. Let's proceed with the installation:
yum install phpmyadmin
Next, you must immediately install the LAMP components:
yum install php-json php-mbstring php-mysqli
And at the very end just reboot the server with a command:
systemctl restart httpd
After the reboot, configure the virtual domain using a special configuration file in the directory vi /etc/httpd/conf.d/phpMyAdmin.conf. Its contents should be as follows:
Define root_domain phpmyadmin.dmosk.local
Define root_path /usr/share/phpMyAdmin
Options Indexes ExecCGI FollowSymLinks
Require all granted
You can just copy and paste it into a file. Be sure to save your changes. Just in case, enter a command:
It is needed to check for errors. If everything is correct and no errors are detected by the server, restart it. This concludes the installation of phpMyAdmin on CentOS. Now you can go to the page with the virtual domain, and after entering your password and username will be able to log in.
That is the end of our material. Should you have any questions or have any configuration issues, please feel free to contact the HostZealot specialists using the phone numbers indicated on our website or by a LiveChat. Have a nice day!