MySQL 8.0 Database Administrator — Question 56
You want to dump all databases with names that start with "db".
Which command will achieve this?
Answer options
- A. mysqlpump --include-tables=db.% --result-file=all_db_backup.sql
- B. mysqlpump > all_db_backup.sql
- C. mysqlpump --include-databases=db --result-file=all_db_backup.sql
- D. mysqlpump --include-databases=db% --result-file=all_db_backup.sql
Correct answer: C
Explanation
The correct choice, C, specifies the inclusion of databases that start with 'db' correctly without any wildcard issues. Option A incorrectly uses the include-tables flag instead of include-databases, while B does not specify any databases to include, and D incorrectly suggests using 'db%' which is less precise than just 'db' for naming.