Location : PHP Hosting - Web Hosting Knowledge Base - PHP MySQL Tutorial

Revoke MySQL user access to database

If you want to retain both MySQL database and MySQL user created, but wish to only remove access granted earlier of a MySQL user to a database, it is possible to be done through the hosting account control panel.

Login to hosting account control panel, click on SQL database option to bring up the database management screen. In the list of currently available database section, there is a listing of mysql user granted access to the particular database just above the sample connection string, click Delete to revoke access of this particular MySQL user from the database.

Note that after the revoke process, the MySQL database and the MySQL user is still present in the respective section in the database management screen, but any connection attempts using this user to connect to the database that has just been revoke access from will get a connection error.