DBS-C01 Database Security Practice Question
A company is using Amazon RDS for MySQL and wants to restrict access to a specific database so that an application user can only perform SELECT and INSERT operations on tables within that database. The application user already exists. Which SQL statement should be executed?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
GRANT SELECT, INSERT ON app_db.* TO 'app_user'@'%';
It grants exactly the required SELECT and INSERT privileges on all tables within the app_db database. Option A is incorrect because it only grants SELECT, missing INSERT. Option B is incorrect because it includes unnecessary DDL privileges (CREATE, ALTER) which are not needed and could be a security risk. Option D is incorrect because it grants ALL PRIVILEGES, which is too permissive for an application user.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
GRANT SELECT ON app_db.* TO 'app_user'@'%';
Why it's wrong here
This only grants SELECT, not INSERT.
- ✗
GRANT CREATE, ALTER, SELECT, INSERT ON app_db.* TO 'app_user'@'%';
Why it's wrong here
This includes CREATE and ALTER, which are not desired.
- ✓
GRANT SELECT, INSERT ON app_db.* TO 'app_user'@'%';
Why this is correct
This grants exactly the required permissions.
- ✗
GRANT ALL PRIVILEGES ON app_db.* TO 'app_user'@'%';
Why it's wrong here
This grants all privileges, not just SELECT and INSERT.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DBS-C01 question from scratch — 1,663 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.