How to Install phpMyAdmin On Ubuntu Server 18.04 For MySQL Administration

How to Install phpMyAdmin On Ubuntu Server 18.04 For MySQL Administration
Make your MySQL database administration much easier with the help of GUI

Install phpMyAdmin On Ubuntu Server, MySQL is a powerful database application that enables to serve as the muse of such a lot of packages and offerings.

In truth, among the web sites you go to (along with Facebook, GitHub, iStock, US Navy, YouTube, Spotify, and extra) are powered through MySQL.

For many database directors, operating from in the command line interface is a no-brainer.

But for a few, having a user-friendly GUI can mean in reality working with a stage of efficiency the command spark off can not offer.

One of the first-rate tools for this project is phpMyAdmin.

The phpMyAdmin device is an extremely easy to use interface that can be established on off-the-shelf hardware with a unmarried command.

The most effective caveat to the installation is that it has changed from preceding iterations and the MySQL permissions can be finicky.

Installation

Before we run the installation instructions, it’s constantly clever to replace and upgrade Ubuntu Server.

Because the kernel might be upgraded, it’s exceptional to run the replace/upgrade procedure at a time while a reboot is possible.

To update and upgrade Ubuntu Server, login and problem the subsequent instructions:


sudo apt-get update
sudo apt-get upgrade -y

When the above commands complete, reboot the server (if wished) and deploy the Apache and MySQL servers (if they aren’t already set up) with the command:


sudo apt-get install lamp-server^ -y

When that command completes, configure MySQL with the command:


sudo mysql_secure_installation

Upon issuing the above command, you’ll be brought about to create a password for the MySQL admin consumer, as well as:

  • Remove anonymous users y/n
  • Disallow root login remotely y/n
  • Remove take a look at database and get admission to to it y/n
  • Reload privilege tables now y/n

Answer yes to all of the above questions.

Next, set up phpMyAdmin with the command:


sudo apt-get install phpmyadmin php-mbstring php-gettext -y

During the set up, you’ll be asked to pick which internet server will be used to run phpMyAdmin.

Make certain to pick out apache2 from the alternatives. To do that, follow those steps:

01. Tap the spacebar to your keyboard to choose apache2.

02. Press the Tab key to your keyboard till Ok is selected and use the Enter key to maintain on.

03. Next, you’ll be prompted to Configure the database for phpmyadmin. Yes should already be decided on, so use Enter for your keyboard to retain.

04. Next, you’ll be caused to create a password for the phpmyadmin user. Make this a completely unique and robust password. Type this new password, tab all the way down to Ok, use the Enter key to your keyboard to maintain, and then (while caused) verify the newly created password.

05. This completes the first stage of the installation.

Configuring User Privileges

Configuring User Privileges

In earlier iterations, you may now factor your browser to http://SERVER_IP/phpmyadmin (Where SERVER_IP is the IP address of the website hosting server) and log in with the MySQL admin user credentials.

Install phpMyAdmin On Ubuntu Server, That is not the case. Instead, you need to give the phpmyadmin user the essential privileges to manage the databases.

To do that, move again to the terminal window on your server and open the MySQL database activate with the subsequent command:


sudo mysql

At the MySQL prompt, issue the following commands:


GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
EXIT

Where password is the password you created for the phpmyadmin user during installation.

Install phpMyAdmin On Ubuntu Server, Creating a New User

If you’d rather create a brand new person (one so one can additionally be able to manage databases from within phpMyAdmin), issue the following commands:


sudo mysql
CREATE USER username IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO ‘username’@'localhost' IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
EXIT

Where username is the username to be created and password is a completely unique and strong password for the user.

Install phpMyAdmin On Ubuntu Server, Logging Into phpMyAdmin

Install phpMyAdmin On Ubuntu Server, Creating a New User

Now it’s time to point your browser to http://SERVER_IP/phpmyadmin (Where SERVER_IP is the IP deal with of your server).

You could be caused for a username and password. Here you may both use phpmyadmin.

Because the consumer and the password you created for the phpmyadmin consumer (for the duration of installation).

The brand new consumer/password you produced from the MySQL spark off.

Install phpMyAdmin On Ubuntu Server, Logging Into phpMyAdmin

If you click on at the Databases tab, you should see that the person you logged in with has all the necessary permissions to start running with the MySQL databases, through the phpMyAdmin interface.

Create and manage databases, tables, and statistics from inside this consumer-pleasant internet-based totally MySQL GUI.