we can restrict some user or group of user to accessing database.
let we have in table directory phpMyadmin 3 types of user
login_user_type
1 - Admin
2- Admin and Colleague or main user with special privilege
3- Normal user with limited access
Restrict and redirect the user to certain page limited privilege accessing SQL database
Only Admin privilege :
<?php if($_SESSION['login_user_type']== 1) ; else{header("location:login.php"); } ?>
Admin and main user privilege :
<?php if($_SESSION['login_user_type'] == 1 or $_SESSION['login_user_type'] == 2); else{header("location:login.php"); } ?>
Normal user access :
From above two option now you can control the normal user for using the SQL database.