CV0-004 Troubleshooting Practice Question
Exhibit
CloudWatch Logs: 2025-03-01T10:00:00Z ERROR: Connection refused to database endpoint: db.example.com:3306 2025-03-01T10:00:01Z INFO: Retrying in 1 second... 2025-03-01T10:00:02Z ERROR: Connection refused to database endpoint: db.example.com:3306
Refer to the exhibit. An application running on an EC2 instance is failing to connect to an RDS database. What is the most likely issue?
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
✓
The security group for the RDS instance does not allow inbound traffic from the EC2 instance
A 'connection refused' error typically indicates that the database is reachable but the port is blocked, likely by a security group. Option A is wrong if the database is in a different VPC, the error would be timeout or no route. Option C is wrong because a stopped database would result in a 'no route to host' or timeout. Option D is wrong because port 3306 is standard for MySQL and the error is not about wrong port.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The database instance is in a different VPC
Why it's wrong here
Cross-VPC connectivity issues typically result in timeout, not connection refused.
- ✓
The security group for the RDS instance does not allow inbound traffic from the EC2 instance
Why this is correct
A security group denying inbound traffic causes a TCP reset, resulting in connection refused.
- ✗
The database instance is stopped
Why it's wrong here
A stopped database would not respond at all, leading to a timeout.
- ✗
The application is using the wrong database port
Why it's wrong here
Wrong port would also cause connection refused, but 3306 is correct for MySQL; other ports would show similar error but this is less likely.
Go deeper
Related to this question
About these practice questions
One of 977 original CV0-004 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.