How to PHP Scripting- MySQL Database with phpMyAdmin

A database is a separate application that stores a collection of data. You can create many databases as you want. Each database has one or more distinct APIs for creating, accessing, managing, searching and replicating the data it holds. With PHP, you can connect to and manipulate databases. MySQL is the most popular database system used with PHP.

In this guide, we are using phpMyAdmin to administer MySQL database which is automatically installed with Xampp package. Check our tutorial, how to install and configure Xampp server. PhpMyAdmin is also integrated with Cpanel of your web hosting.

PhpMyAdmin is one of the most popular applications for MySQL databases management. It is a free tool written in PHP. Through this software, you can create, alter, drop, delete, import and export MySQL database tables.

To access phpMyAdmin, open your Web browser and go to http://localhost/phpmyadmin/.

 

phpMyAdmin

php MySQL with phpMyAdmin

 

In the upper part, you will find the server hostname. The databases which you will manage are stored on the same server as the software and the hostname is localhost.

In the right column, you can change the default language, alter the style, customize the theme color and the font size.

 

Create a user account using phpMyAdmin

You can create MySQL user accounts with PHPMyAdmin administration tool and also you can grand customized privileges to users. Let’s look how to create user accounts.

 

User accounts

MySQL with phpMyAdmin

 

  1. click on the “Privileges” link.
  2. Click on the “Add a new User link”.
  3. Assign User a login and password.
  4. Where it says “Database for User” select “None”.
  5. select global privileges to create database.
  6. Press the “Go” button.

 

Add user account

MySQL with phpMyAdmin

 

Now we’ve MySQL with username & password. Let’s connect to MySQL server and create a database on next tutorial.

 

Anwar Yakkiparamban

Anwar Yakkiparamban is the founder of Lauyou Learning. Prior to Lauyou learning, Anwar worked at ARD Engineering & Development, Qatar. He holds bachelor degree in Electronics and Communication Engineering from Govt. Engineering College Idukki.

You may also like...