In this article on Working with phpMyAdmin – Creating Users and Assigning Privileges, I will explain how to create a user for a database and how to assign privileges to that user.
Also developed in PHP, phpMyAdmin is a tool that allows users to manage MySQL database. Basically, it is a free software tool and provides many features that make managing the database operations easier. For instance, you can create database, tables, indexes, constraints and other operations. Otherwise you need to perform these operations with SQL commands. Moreover, you can write and execute the SQL commands in the SQL editor that is available in this tool.
Demonstration of Working with phpMyAdmin – Creating Users and Assigning Privileges
At first, start the Wampserver and click on the phpMyAdmin.
As a result, we get the following interface that contains the options to perform different tasks on the database. As can be seen below, on the left pane, there is a list of existing databases.
In order to create a database, click on the Database option. So, you get the list of existing databases as well as provision to create a new database.
After that enter the name of the database and click on the Create button.
In order to create the database users, click on the Privileges option.
After that, click on the Add user account.
Now enter the username and password and check on the option for granting all privileges.
Also, click on the Check All button. It will assign the global privileges.
Furthermore, you can also set the option for accessing the database using SSL. For now, leave it as the default option of REQUIRE NONE.
After That, click on the Go button. It will execute the Create User SQL command.
Again click on the Databases tab. You will find the name of your newly created database in the list. In order to find the database user and privileges, click on the Check privileges link.
As can be seen below, the database mydb has two users mydb_user and root. Both of these users have all privileges.
Examples of Array Functions in PHP
Basic Programs in PHP
Registration Form Using PDO in PHP
Inserting Information from Multiple CheckBox Selection in a Database Table in PHP
PHP Projects for Undergraduate Students
Architectural Constraints of REST API
REST API Concepts
Creating a Classified Ads Application in PHP