Javatpoint Logo
Javatpoint Logo

How to Install PhpMyAdmin in Ubuntu 16.04?

Introduction

phpMyAdmin is a administration tool to handle MySQL database. It was created to provide a user interface so that database can be managed easily.

PhpMyAdmin is an open-source and free administration tool for MariaDB and MySQL. Specified primarily in PHP as a compact web application, it has one of the most famous administration tools of MySQL, mainly for web hosting services.

PhpMyAdmin supports a huge variety of tasks with MySQL. Continuously used tasks are supported via the user interface (handling database, permissions, users, indexes, relations, fields, tables, etc.), while we still have the capability to directly run any SQL statement.

Brief History of phpMyAdmin

Tobias Ratschiller, an IT consultant, and the Maguma software company's founder, started to operate on a PHP-based web front-end in 1988 to MySQL, influenced by MySQL-Webadmin. In 2000, he abandoned the project because of insufficient time.

PhpMyAdmin has become the most famous MySQL administration tool and PHP application, with a major community of contributors and users. At SourceForge, a company of three developers enrolled the phpMyAdmin Project and took over the improvement in 2001 to coordinate the increasing patches.

The downloads and the main website left SourceForge in July 2015 and moved to the content delivery network. The releases started to be PGP-signed at the same time. Later, the mailing lists were relocated, and issue tracking was shifted to GitHub. Before the 4 version, which extensively utilizes Ajax to increase usability, the application utilized HTML frames.

Features of phpMyAdmin

The program provides several features, including:

  • Web interface
  • Export data to many formats: SQL, LaTeX, Excel, Word, ISO/IEC 26300- Spreadsheet and OpenDocument Text, PDF (by the TCPDF library), JSON, XML, SQL, CSV, and others.
  • Import data from SQL, JSON, and CSV
  • MariaDB and MySQL database management
  • Administering two or more servers
  • Making database layout PDF graphics
  • Making complex queries with QBE (query-by-example)
  • Globally searching in a subset of it or in a database
  • Converting stored data into a format with a group of predefined functions, such as showing BLOB-data as a download link or image
  • Live charts to check the activity of the MySQL server, like memory/CPU usage, processes, connections, etc.
  • Network traffic for the SQL server
  • Make complicated SQL queries simple.
  • Operating with many operating systems, including Free BSD Unix (like AIX, Sun Solaris), OS/2, Linux, Windows, and others.
  • Supports almost every feature of MySQL:
    • Scan and drop indexes, fields, views, tables, and databases.
    • Create, drop, rename, copy, and alter indexes, fields, tables, and databases.
    • Maintenance tables, databases, and servers, with ideas on server configuration.
    • Run, bookmark, and edit SQL statements and batch queries.
    • Handle triggers and stored procedures.

Using different parts of phpMyAdmin

Databases

We will see a list with every database managed by the database user inside the Databases tab.

Once we click on the selected database name, we can start handling that database.

We will find a table along with the number of rows and the tables, the used collations, the overhead and the total size, and the indexes and the data size.

SQL

We can implement a MySQL query to the MySQL server with the help of this tab. We only need to enter the query, press the Go button, and then the phpMyAdmin tool will run the query and give the results through it.

Status

We can see detailed information associated with the MySQL server from the last reboot inside the Status tab.

We can find the traffic managed by the MySQL server, the biggest simultaneous connections, the aborted and the failed attempts, the total count of queries transferred to the server, the total count of connections, and more associated details.

Export

We can export the content of our database tables in several formats, including XML, Microsoft Word, Microsoft Excel, PDF, SQL, CSV, and various others. We can choose every database table or simply select a few of them.

We can include custom comments inside the exported content header. We can determine whether to ship only the data, the database structure, or both of them. We can ship the database tables within a file, or we can visualize many queries on the screen directly.

Import

We can import all database tables through a file stored on our local computer inside the Import tab. We can scan the file for importing and picking its character set with the drop-down menu.

The timeout of the MySQL server can be reached if the file is too large. In such a situation, we can delay the import action. After that, we can proceed with data import specifying all queries to be bound from the file start. We can bound the imported queries and proceed from the interruption point.

We can also select the SQL server mode of our imported file. We can search for more information inside the documentation of Server SQL Modes.

Settings

We can set up phpMyAdmin the way we want it to inside the Settings tab.
We can customize which information to view in the panels on the distinct pages, modify the preselected options (default) on the Export and Import tabs, and many others.

Variables

Every current variable of MySQL and its values are available in Variables.
We can click on the Edit button, which is next to all variable names for editing the variable values. Remember that we may not be capable of modifying every variable value because it is only permitted on the server with the root user.

Charsets

We can see every collation and charset supported via the MySQL server inside the Charsets tab.

Plugins

This tab displays a list of every installed MySQL plugin currently and details of them, including version and description.

Engines

This tab launches a page and a list of every engine supported via the MySQL server. MyISAM is the default one. Another famous storage engine is InnoDB utilized by several databases. More details about the engines of the MySQL server can be detected in the official documentation.

Managing databases with phpMyAdmin

Managing our database is the primary purpose of the phpMyAdmin tool. We will discuss how to utilize various functionalities of phpMyAdmin. When we launch the home page of phpMyAdmin, press Databases and choose a database for managing by pressing its name.

We will find a list and the database tables, the permitted operations with them, the storage engine, the total records, the table size, the collation, and the overhead in the page. The possible operations which we can implement to a selected table are:

  • Browse

The table using the existing records can only be browsed. When we press the Browse option, a new page, and the record list will be opened in the table.

By pressing the Edit option, we can edit ye selected record.
We will find the record structure, and we can edit the record values. When we are done with the alterations, we can submit them by pressing the Go option at the bottom section of the page.

  • Structure

By pressing Structure, a new page will appear that displays the structure of the database table.

We will find the field's names, types, attributes, collations, additional other information, and default values (whether the values of the field can be NULL). We can browse for different values by pressing the associated action icon. We can also edit the structure of a field or remove a field. We can specify distinct indexes: Fulltext, Index, Unique, and Primary.

  • Search

We can produce a search query for the selected table using the Search button. We can use the Query by example feature to implement a search. We just need to use the distinct fields for structuring our search query and press the Go option to run it.

For instance, if we wish to visualize every record and a field value that begins with "a", we should first choose the fields which we wish to display. Select the LIKE operator using the drop-down menu and input in the related field value "a%" (where % is used for a wildcard string). Press Go to view the output.

  • Insert

We can insert in our database table with the Insert option. Once we enter in the related values, press the Go, button and a new record will be added.

  • Drop

We can remove the entire database table and every record saved in it using the Drop button.

  • Empty

It permits us to empty any database table, remove the data, and keep the empty table.

Usage of the Operations of phpMyAdmin

There are distinct operations that we can implement on the entire database and a different table.

  • Database operations

We first need to open our phpMyAdmin tool from our Site Tools and go to Databases. Choose a database and then navigate to Operations. A new page will open on which we can see every possible operation which we can apply to a database.

  • Database table operations

In phpMyAdmin, we should choose a desired table and press the Operations button to implement the related operations on the database table.

  • The Move table to field permits us to move our table using a new name upon the current database or a distinct database.
  • Inside the Table options field, we can rename our table, modify the collation and the storage engine, and insert comments.
  • With the Copy table to field, we can copy our table using a new name upon the current database, or it could be copied in another table.
  • With the Table Maintenance field, we can see several options which will aid us in maintaining our database table. These options are:
    • Analyze table
    • Check table
    • Repair table
    • Optimize table

Installation of phpMyAdmin

In this tutorial, we are installing and phpMyAdmin. Installation process includes the following steps.

1) Check phpMyAdmin

First check, is phpMyAdmin already installed by using localhost/phpmyadmin on the browser.

Software PhpMyAdmin 1

It displays Not Found message, it means phpMyAdmin is not installed. Now, lets install it.

2) Install phpMyAdmin

Use the following command to the terminal.

Software PhpMyAdmin 2

3) Configure with Apache Web Server

During installation, it will prompt to configure phpMyAdmin with web server. Select apache2 and

Software PhpMyAdmin 3

click Ok.

4) Configure Database MySQL

Click Ok to configure phpMyAdmin with MySQL.

Software PhpMyAdmin 4

After clicking Ok, it asks for configure using dbconfig-common tool.

Software PhpMyAdmin 5

Provide MySQL password, so that it can connect and load databases to the user interface.

Software PhpMyAdmin 6

Provide MySQL password once again for confirmation.

Software PhpMyAdmin 7

Click Ok, and all set. Now, access phpMyAdmin using localhost/phpmyadmin over the browser.

Software PhpMyAdmin 8

It shows a login panel to access MySQL by using phpMyAdmin. Till now, we have successfully install phpMyAdmin in the Ubuntu 16.04.







Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA