MySQL Questions and Answers – Using Backups for Data Recovery

This set of MySQL Quiz focuses on “Using Backups for Data Recovery”.

1. Which program converts binary log files to statements in text form?
a) mysqldump
b) mysqllog
c) mysqlbin
d) mysqlbinlog
View Answer

Answer: d
Explanation: The ‘mysqlbinlog’ program is used to convert the binary log files to statements in text form. This makes it easy to execute. The output from ‘mysqlbinlog’ is used as input to mysql.

2. The ‘mysqlbackup’ command to perform a restore operation is _____________
a) copy-back-and-apply-log
b) apply-log-and-copy-back
c) copy-log-and-apply-back
d) apply-back-and-copy-log
View Answer

Answer: a
Explanation: The ‘mysqlbackup’ commands to perform a restore operation are ‘copy-back-and-apply-log’ and ‘copy-back’ (for directory backup only). The restoration process requires the database server to be already shut down.

3. The myisamchk variable that represents the size of buffer used to hold index blocks is _____________
a) key_buffer_size
b) read_buffer_size
c) sort_buffer_size
d) write_buffer_size
View Answer

Answer: a
Explanation: The myisamchk variable ‘key_buffer_size’ stores the size of buffer that is used to hold index blocks. ‘read_buffer_size’ stores size of buffer used for read operations, ‘sort_buffer_size’ is used for sorting.
advertisement
advertisement

4. Where does MySQL Enterprise Backup record details of each backup?
a) history_backup
b) backup_history
c) backlog_history
d) history_backlog
View Answer

Answer: b
Explanation: The restored data includes the ‘backup_history’ table, where ‘MySQL Enterprise Backup’ records details of each backup. The table allows to perform future incremental backups using ‘–incremental-base=history:last_backup’.

5. The MySQL server is not configurable.
a) True
b) False
View Answer

Answer: b
Explanation: The MySQL server is highly configurable. Some of the operational characteristics that you can control include which storage engines the server supports, the default character set, and its default time zone.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Multiple MySQL servers can be run on the same machine.
a) True
b) False
View Answer

Answer: b
Explanation: It is useful to run multiple servers on the same machine under certain circumstances. A new MySQL release can also be tested while leaving the current production server in place.

7. What is the log in which data changes received from a replication master server are written?
a) error log
b) general query log
c) binary log
d) relay log
View Answer

Answer: d
Explanation: The Relay Log has the data changes received from a replication master server written in it. The problems encountered during the starting, running or stopping of ‘mysqld’ is written in error log.
advertisement

8. The metadata log is _______________
a) error log
b) ddl log
c) binary log
d) relay log
View Answer

Answer: b
Explanation: The DDL log is also known as the metadata log. The metadata operations performed by the DDL statements. The Relay Log has the data changes received from a replication master server written in it.

9. What is the default size of ‘max_binlog_cache_size’ system variable?
a) 1 GB
b) 2 GB
c) 4 GB
d) 8 GB
View Answer

Answer: c
Explanation: The max_binlog_cache_size system variable can be used to restrict the total size used to cache a multiple-statement transaction. If transaction is larger than this it fails and rolls back.
advertisement

10. The higher priority is ______________

writes, reads

a) writes
b) reads
c) same priority
d) machine dependent
View Answer

Answer: a
Explanation: A client performing an operation that modifies a table is a writer and the client that performs a retrieval from the table is a reader. The writes have higher priority than reads.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL for Quizzes, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.