Search code examples
phpandroidmysqldatabasedatabase-security

What database privileges to grant to the user?


I am making a network based Android application. I have created a server on my web hosting. I have used PHP and MySQL to handle database operations, now I want to assign a user to this database and grant him/her privileges so as to manipulate data.

However I am not sure which privileges I should grant to the user and which not, I have attached a screen shot to the page asking me to grant privileges, I want to know what will be secure and what can cause me potential harm.

enter image description here


Solution

  • You only need CRUD (Create, Read, Update, Delete) privileges.

    So DELETE, INSERT, UPDATE, SELECT and EXECUTE(if you have some stored procedures to call) should suffice!