phpMyAdmin is a free and open-source database management software with GUI (Graphical User Interface) written in PHP langguage. You can use it to manage your Relational Database Management System (RDBMS) like MySQL or MariaDB without any cost or 100% free to use. It’s easy to install and manage under your virtual machine, either it running on vps, cloud or bare metal server.
Well, today we will guide you on how to setting up phpMyAdmin under cloud server running Ubuntu 20.04 LTS (Focal Fossa). So, you can manage your database easily without CLI or command-line interventions like run sql query, or add and drop a database. Before starting install phpMyAdmin on your virtual machine, make sure that you’ve fill the following requirenments.
PREREQUISITES: * VPS / Cloud / Bare Metal * VM with Ubuntu 20.04 LTS (Focal Fossa) x86_64 * Superuser Privileges (Root Access) * Server IPv4 Address * Password Root * gNome Terminal for Linux Desktop * PuTTy SSH Client for Windows/Mac
1.) Login into your SSH Client (PuTTy or gNome Terminal) and make sure to run system update.
$ apt update && apt upgrade
2.) After that, just sit back and let’s install Apache 2.4 web server with the following command.
$ apt install apache2 apache2-doc apache2-utils
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap Suggested packages: apache2-suexec-pristine | apache2-suexec-custom The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-doc apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap 0 upgraded, 9 newly installed, 0 to remove and 11 not upgraded. Need to get 5.562 kB of archives. After this operation, 32,3 MB of additional disk space will be used. Do you want to continue? [Y/n] y
3.) Let’s install phpMyAdmin on your virtual machine. Just run the following command. Also, don’t forget to select “Yes” to configure database for phpMyAdmin with dbconfig-common.
$ apt install phpmyadmin
In the installation proccess you will be asked which web server that should be automatically configured to run phpMyAdmin. Simply select Apache web server, instead of lighttpd.
4.) Then you will be prompted to enter database server administrative user, so just paste your MySQL/MariaDB application password for phpMyAdmin here.
Re-enter the password.
The phpMyAdmin installation has been completed.
5.) After we’ve phpMyAdmin installed under your cloud server, you should create a symbolic linkj (symlink) from phpmyadmin installation directory to the public or document root directory. On this case we can use “html” directory to symlink from phpmyadmin directory.
$ ln -s /usr/share/phpmyadmin /var/www/html
6.) Restart Apache Web Server and Access Your phpMyAdmin on local browser (eg, Google Chrome or Mozilla Firefox).
$ service apache2 restart
NOTE: On the login form, you can fill the username and password with your MySQL/MariaDB root account. Or simply create a new user and its password. Then, paste it on the login form, so you can easily manage your database server with Graphical User Interface.