MySQL is hard to deal with in case you don't know SQL queries. For example, If you want to select a user that has specific email address example@gmail.net from users table, You will have to execute the following query in your MySQL console to select a record.
mysql> SELECT * from users where email='example@gmail.net';
`
It is the simplest query that is executed on MySQL console. Still, It's hard for new MySQL users or non-tech people like bloggers. PHPMyAdmin allows you to execute these queries without actually writing them. How? Let's understand what PHPMyAdmin is.
Table of Contents
ToggleWhat is PHPMyAdmin?
In most straightforward words, PHPMyAdmin is the GUI version of MySQL. The tagline of PHPMyAdmin is Bringing MySQL to the web. And the slogan is utterly perfect! That's what it does! PHPMyAdmin will execute the queries behind the scenes as you work on your database. For instance, you want to see the records stored in the users table. So, You will click on the users table in the database, and you will get a list of users stored in the table. Behind the scenes, PHPMyAdmin will execute the following query in MySQL and will display the data returned by MySQL in tabular form.Query: SELECT * from users;Now, Let's assume you want to change the
email
field of any specific user which is incorrect currently. So, You will click on the field, and the field will convert into the input box in which you can edit data. Once you will correct the email and hit Enter key, It will execute a query to update email field for the record you are updating, behind the scenes!
So, It makes everything very easy and professionals love it. Not only add, update and delete, but there are hundreds of features available in PHPMyAdmin. It's very powerful.
PHPMyAdmin is a standalone application. It does not come with MySQL by default. We have to have to install it manually on our server.
So, let's get started with the installation.
Install PHPMyAdmin on Ubuntu 16.04
First of all, If you are a ServerAvatar user, you don't have to install PHPMyAdmin Manually. You can access PHPMyAdmin directly from the Databases section of your Server Panel just like the following image. If you are not a ServerAvatar user, Just follow the tutorial. The installation process is pretty straightforward and easy. Normally, It will take 5-10 minutes to install PHPMyAdmin on Ubuntu 16.04.Prerequisites
Make sure you have root access to the user so that you can install PHPMyAdmin package. Either you can log in as root, or you can log in as a user with sudo privileges. Also, Make sure you have PHP and MySQL installed on the server. If PHP is not installed, you won't be able to access PHPMyAdmin as it is written in PHP. If MySQL is not installed, You won't be able to log into PHPMyAdmin as it will log you in as a MySQL user. Other than that, I am sure you have Ubuntu 16.04 operating system as this article is dedicated to Ubuntu 16.04 Operating system. Once you have these things ready, we are prepared to go.Installation
To install PHPMyAdmin, we first have to install two PHP dependencies that PHPMyAdmin requires in order to work perfectly. Those dependencies arephp-mbstring
and php-zip
To install these dependencies, Execute the following command.
user@host:~$ sudo apt-get install php-mbstring php-zip -yOnce installed, Execute the following command to install main PHPMyAdmin package in the system.
user@host:~$ sudo apt-get install phpmyadmin -yWhile it is being installed , you will get some prompts that you have to answer. The first prompt will ask you to select the web server you are using. In this case, I am going to select Apache because I am using apache on my server. Don't hit the enter key without selecting an option because in that case, you might get 404 not found on the PHPMyAdmin page. Here are the controls that you have to use in the process.
- Up & Down keys: To navigate between available options.
- Tab: To jump between options and OK button.
- Space: To select an option.
http://IP_ADDRESS_OF_YOUR_SERVER/phpmyadminThe PHPMyAdmin page will look like the following image. So, This is how you can install PHPMyAdmin on Ubuntu 16.04 server. It is effortless and fast process, and once you understand it correctly, you won't make any mistakes again during installation. The most common mistake everyone makes is in the first prompt in which we have to select the web server we are using on our server. If you fail to choose the right web server in that prompt, you will get an
404 not found
error on PHPMyAdmin page. In that case, uninstall PHPMyAdmin and install it again.
Conclusion: PHPMyAdmin is a potent tool to manage your MySQL databases, and it is straightforward to install. It is a free tool. Let us know in the comment section case you face some issues with the installation process or installation itself. We will surely help you solve the issue as soon as possible.