HOW-TO: Install MySQL Server with phpMyAdmin on Ubuntu 16.04 LTS

In this post, I will show you how to install MySQL server with phpMyAdmin to manage it. phpMyAdmin requires Apache2 to be installed, refer to this guide if you don’t already have it installed.

Once you are logged on to your Ubuntu instance, launch Terminal if in GUI or just issue the commands below (server – without GUI):

MySQL Server

sudo apt-get install mysql-server

Verify the packages that will be installed, then type y for yes and press Enter

You will see the installation begin then pause to ask you to configure a root password for MySQL. (This is different than the machine root account password) – Enter your new MySQL root password then press Ok

In the next prompt, confirm your root password and press Ok again

Assuming no errors, MySQL Server should be successfully installed. Now we will install phpMyAdmin to manage our new MySQL server.


sudo apt-get install phpmyadmin

Verify the packages that will be installed, then type y for yes and press Enter

In the middle of the installation, you will get a prompt asking you to select the web server that should be automatically configured to run phpMyAdmin, which in our case, Apache2. Select apache2 and press Ok

You will get another prompt to automatically configure the database for phpMyAdmin. Press Yes to continue

Last prompt will ask to provide a password for phpMyAdmin to register with the database server. You can either enter any password or leave blank to automatically let the installation choose a password for you. In this case, I left it blank. Press Ok to continue

Assuming no errors again, phpMyAdmin should be fully installed and configured with your MySQL database server. Browse to your server’s address and add /phpmyadmin at the end of the URL. You will get the Welcome to phpMyAdmin page. Enter your database root username and password to login.

Have fun 🙂

Show Comments