PhpMyAdmin is a widely used tool for administering MySQL databases online. This part of the tutorial explains how to create new MySQL databases as well as users and assigning privileges to users. The second part deals with inserting editing or deleting data From MySQL database using phpMyAdmin.
After logging in to phpMyAdmin, we can create a new database by entering the name of the database and clicking on create.
To add a new user click on Priviledges. After the Priviledges page is displayed, Click on Add a new User. The form to add a new user will be displayed.
Wherever possible grant only access to a particular database for an user. i.e. create different user names and passwords for each database.
This way even if an unauthorised person gets hold of a password, the potential damage will be restricted to a single database.
To tighten up things further on the security front, grant the user only as much privileges as necessary. For example full privileges are required only during the creation of the various tables of the Affordable Online Examination System. Thereafter only Data privileges (i.e. SELECT , INSERT, UPDATE, DELETE) are required.
To add (or edit) privileges for an user, click on privileges. The complete list of users( which you are authorised to administer) will be displayed . Click on the icon next to the user whose privileges you wish to modify. In the screenshot below we are editing privileges for user olexam.
From the page that appears navigate to the Database-specific privileges section. Under Add privileges on the following database select the database aolexam or any other database that you wish to grant privileges to the selected user.
In the next page, Under the User 'olexam'@'localhost' - Database aolexam : Edit Privileges. Navigate to the Database-specific privileges. Under Data click on the check boxes for SELECT, INSERT, UPDATE, DELETE as shown in the screenshot below and then click on the GO button.
We can then navigate to the database aolexam by clicking on the database name on the left side. From the page that appears click on privileges and a view similar to the screenshot below will appear. The list of all users having privileges on the database aolexam will be listed together with their privileges. This is a nice method of verifying that everything is in order.