MySQL 8.0 Database Administrator — Question 21

Binary log events for the ‘mydb1’ schema must be copied to a different schema name ‘mydb2’.
Which command will do this?

Answer options

Correct answer: A

Explanation

The correct answer is A because it uses the --rewrite-db option properly to specify that events from 'mydb1' should be rewritten for 'mydb2'. Option B contains a typo in 'datebase' and also does not rewrite the schema correctly. Option C incorrectly uses two --rewrite-db options without proper syntax, and option D attempts a workaround with sed that is less efficient and may not handle all cases correctly.