phpMyAdmin is an open-source software tool introduced on September 9, 1998, which is written in PHP. Basically, it is a third-party tool to manage the tables and data inside the database. phpMyAdmin supports various type of operations on MariaDB and MySQL. The main purpose of phpMyAdmin is to handle the administration of MySQL over the web.
It is the most popular application for MySQL database management. We can create, update, drop, alter, delete, import, and export MySQL database tables by using this software. phpMyAdmin also supports a wide range of operation like managing databases, relations, tables, columns, indexes, permissions, and users, etc., on MySQL and MariaDB. These operations can be performed via user interface, while we still have the ability to execute any SQL statement.
phpMyAdmin is translated into 72 languages and also supports both RTL and LTR languages so that the wide range of people can easily use this software. We can run MySQL queries, repair, optimized, check tables, and also execute other database management commands. phpMyAdmin can also be used to perform administrative tasks such as database creation, query execution.
phpMyAdmin is a GUI-based application which is used to manage MySQL database. We can manually create database and table and execute the query on them. It provides a web-based interface and can run on any server. Since it is web-based, so we can access it from any computer.
phpMyAdmin supports several features that are given below:
phpMyAdmin lacks a lot of features in import/export functionality. There are some backup problems with phpMyAdmin that are given below:
Web server - phpMyAdmin's interface is based on our web browser, we need a web server to keep phpMyAdmin's files inside it. Apache and IIS are popular web servers. We can download Apache web server from here http://mirrors.estointernet.in/apache//httpd/.
PHP - We also need to install PHP 5.3 or upper version to support different functionalities. It contains different extensions to provide support for these functionalities. For example -
We can download PHP from here. https://www.php.net/downloads.php.
Database - phpMyAdmin supports databases, i.e.
Download the MySQL database from here https://dev.mysql.com/downloads/file/?id=486088 or MariaDB database from here https://mariadb.org/download/.
Web Browser - Web browser is required to access phpMyAdmin with enabled cookie and JavaScript. It can be Chrome, Internet Explorer, etc.
Here we are going to discuss that how to download phpMyAdmin on Windows operating system. Below are the steps-
Step 1:
Download the latest version of phpMyAdmin software tool from here https://www.phpmyadmin.net/ as per the following instruction. Click on the download button to start downloading.
Step 2:
A popup window will open. Click on Close button and move to the next step.
Step 3:
Extract the downloaded file by right-clicking on the file and select Extract here, and rename the folder name with name phpmyadmin for easy access on the browser.
Step 4:
Once all the files of phpMyAdmin extracted successfully, move the extracted folder of phpMyAdmin from downloaded location to C:\Apache\htdocs. We can also extract files directly in the htdocs folder of apache.
Step 5:
Go inside the conf folder of apache in c drive and open httpd file.
Step 6:
Press Ctrl+F key and find index.html written in the file. Now, replace .html extension with .php and save the file.
Step 7:
Now check the status that apache server is running or not from the services of your computer system? If it is not running, then we need to run the apache server to open phpMyAdmin interface on the browser.
Step 8:
Now open the browser and type http://localhost/phpmyadmin/. phpMyAdmin will start running in the browser.
Click on New (1) to create a database and enter the database name in Create database (2) field and then click on Create (3) button. We can create any number of databases.
Enter the table name, number of columns, and click on Go. A message will show that the table is created successfully.
Now enter the field name, type, their size, and any constraint here and save it.
The table is created successfully. We can make changes in the table from here.
We can create the database and tables using phpMyAdmin graphical user interface as well as with coding in php.
<?php $servername = "localhost"; $username = "root"; //default user name is root $password = ""; //default password is blank $conn = mysqli_connect($servername, $username, $password); if(!$conn) die("Connection failed".mysqli_connect_error()); else //echo "Successfully connected with database"; $query = "CREATE DATABASE newDB"; if (mysqli_query($conn, $query)) { echo "Database created successfully with the name newDB"; } else { echo "Error creating database: " . mysqli_error($conn); } mysqli_close($conn); ?>
Output:
Database created successfully with the name newDB.
In phpMyAdmin, we create a database using a graphical user interface as well as by running queries.
<?php $dbhost="localhost"; $dbName="newDB"; $user="root"; $pass=""; $conn = new mysqli("mysql:host=$dbhost;dbname=$dbName",$user,$pass); try{ echo "Successfully connected with newdb database"; } catch(Exception $e){ die("Connection failed".$e->getMessage()); } ?>
Output:
Successfully connected with the database.