How To Install PhpMyAdmin On Linux Mint 20.2
To Install PhpMyAdmin On Linux Mint 20.2
Introduction :
PhpMyAdmin is a free and open source administration tool for MySQL and MariaDB. As a portable web application written primarily in PHP, it has become one of the most popular MySQL administration tools, especially for web hosting services.
Step 1 : Check the OS version by using the below command
root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.2
Release: 20.2
Codename: uma
Step 2 : Install the phpmyadmin by using the below command
root@linuxhelp:~# apt install phpmyadmin -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
php-recode php-gd2 php-pragmarx-google2fa php-bacon-qr-code php-samyoul-u2f-php-server
The following NEW packages will be installed:
phpmyadmin
0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
Need to get 4,426 kB of archives.
After this operation, 27.2 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 phpmyadmin all 4:4.9.5+dfsg1-2 [4,426 kB]
Fetched 4,426 kB in 1s (4,983 kB/s)
Preconfiguring packages ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
Selecting previously unselected package phpmyadmin.
(Reading database ... 283109 files and directories currently installed.)
Preparing to unpack .../phpmyadmin_4%3a4.9.5+dfsg1-2_all.deb ...
Unpacking phpmyadmin (4:4.9.5+dfsg1-2) ...
Setting up phpmyadmin (4:4.9.5+dfsg1-2) ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
checking privileges on database phpmyadmin for phpmyadmin@localhost: user creation needed.
granting access to database phpmyadmin for phpmyadmin@localhost: success.
verifying access for phpmyadmin@localhost: success.
dbconfig-common: dumping mysql database phpmyadmin to /var/tmp/phpmyadmin.phpmyadmin.2021-12-26-06.02.mysql.tIRD5h.
database does not exist.
dbconfig-common: dropping old mysql database phpmyadmin.
dropping database phpmyadmin: database does not exist.
creating database phpmyadmin: success.
verifying database phpmyadmin exists: success.
populating database via sql... done.
dbconfig-common: flushing administrative password
apache2_invoke: Enable configuration phpmyadmin
Processing triggers for doc-base (0.10.9) ...
Processing 1 added doc-base file...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Step 3 : Login into mysql database root by using the below command
root@linuxhelp:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 94
Server version: 10.3.32-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Step 4 : List the databases by using the below command
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| phpmyadmin |
+--------------------+
4 rows in set (0.001 sec)
Step 5 : change the database to phpmyadmin by using the below command
MariaDB [(none)]> use phpmyadmin;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
Step 6 : Create User and Password for phpmyadmin by using the below command
MariaDB [phpmyadmin]> create user user@localhost identified by 'linuxhelp';
Query OK, 0 rows affected (0.001 sec)
Step 7 : Grant the permissions by using the below command
MariaDB [phpmyadmin]> grant all on phpmyadmin.* to user@localhost;
Query OK, 0 rows affected (0.001 sec)
Step 8 : Give privileges by using the below command
MariaDB [phpmyadmin]> flush privileges;
Query OK, 0 rows affected (0.002 sec)
Step 9 : Exiting the mysql database
MariaDB [phpmyadmin]> exit
Bye
Step 10 : Restart the apache2 web server by using the below command
root@linuxhelp:~# systemctl restart apache2
With this, the process of installing PHPMyAdmin on Linux Mint 20.2 has come to an end….!!
grant all on phpmyadmin.* to user@localhost;