How To Install phpMyAdmin on Ubuntu | Cloud Hosting | Digital Ocean | AWS

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

phpMyAdmin serves as a convenient web-based platform for interacting with MySQL databases. In this article, we will guide you through the sequential procedure of both installing phpMyAdmin and establishing the MySQL root password. It’s important to note that the underlying server in use is an instance of Ubuntu server. By the end of this guide, you’ll have a comprehensive understanding of seamlessly setting up and configuring phpMyAdmin on your system.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

To know how to create droplet or instance or server to digital ocean please follow the guide below:

How to Create a Droplet or Instance in Digital Ocean to Launch a Website

To Create LAMP Stack on Digital Ocean or any Cloud please follow the guide below:

How to install LAMP Stack on Digital Ocean Droplet or Instance | Ubuntu | Cloud Server

NOW How to install phpMyAdmin?

Installing phpMyAdmin:

update your server’s package index:

sudo apt update

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

 

Execute the subsequent command for the installation of these packages onto your server.

sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

php

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

It will prompt you with a question. Do u want to continue? Y/N.  YOU just type “Y” and then hit the enter button.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

During the installation of phpMyAdmin, you will display a screen to choose the webserver. You have to just press the spaceBar on your keyboard. It will select apache2, you can see a “*” after you hit the spacebar. Then hit the TAB key on your keyboard and After that hit Enter Button.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Next, you have to press Enter to continue or Choose “Yes” in the dbconfig-common setup dialogue box.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Finally, You have to choose a root password to log in to your phpMyAdmin. You can type the password or paste the password also. Remember Do u forget the password which you will give to log in.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Now you have successfully installed phpMyAdmin.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Now if you want to use MySQL you just have to create a root password for this. To do that use the command

mysql

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

To establish a root password for MySQL, utilize the provided command. It’s essential to substitute “Password” with your chosen password while executing the command. This process ensures the security of your MySQL setup.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Password';

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

After that, if you would like to log in to MySQL you have to use the following command and then you have to give the password which you did with the earlier command.

mysql -u root -p

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

You can now observe that you’ve effectively accessed your MySQL account.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu

Now you can do whatever you want. If you want to create a user, database, etc you can do that.

Installing phpMyAdmin and adding password authentication to MySQL on Ubuntu