MySQL Questions and Answers – Setting Up Replication Servers

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Setting Up Replication Servers”.

1. The slave stores the CHANGE MASTER parameters in the file _____________
a) slave.info
b) slave.inf
c) master.info
d) master.inf
View Answer

Answer: c
Explanation: The ‘slave’ stores the ‘CHANGE MASTER’ parameters in a file named ‘master.info’ in its data directory in order to record the initial replication status. It updates the file as replication proceeds.

2. Which statement on the master expires binary log files?
a) SHOW SLAVE STATUS
b) PURGE MASTER
c) PURGE SLAVE
d) SHOW MASTER STATUS
View Answer

Answer: b
Explanation: The ‘PURGE MASTER’ statement on the master expires binary log files. This can be used after issuing a ‘SHOW SLAVE STATUS’ statement on each of the slaves to determine which log files are no longer needed.

3. Which statement suspends the replication related activity of the slave server?
a) RESUME SLAVE
b) START SLAVE
c) STOP SLAVE
d) GET SLAVE
View Answer

Answer: c
Explanation: The ‘STOP SLAVE’ and ‘START SLAVE’ statements suspend and resume the replication-related activity of a slave server. These statements are useful for telling the slave to be quiescent.
advertisement
advertisement

4. MySQL Enterprise Backup records details of each backup in _____________
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. In which context is the privilege ‘CREATE TABLESPACE’ applied?
a) Server administration
b) Tables
c) Stored routines
d) Views
View Answer

Answer: a
Explanation: The column name associated with the privilege ‘CREATE TABLESPACE’ is ‘Create_tablespace_priv’. The context in which this privilege is being used is the server administration.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. How many of the following languages can interface to bind to the C API of MySQL?

Perl, PHP, Python

a) 0
b) 1
c) 2
d) 3
View Answer

Answer: d
Explanation: The client library provides the means through which the MySQL bindings for other languages can be built on top of the C API. This type of interface exists for Perl, PHP, Python and others.
advertisement

7. PHP scripts are located in the web client document tree.
a) True
b) False
View Answer

Answer: b
Explanation: The PHP scripts are different from DBI scripts since PHP scripts are located within the web server document tree while DBI scripts are located in a cgi-bin directory located outside of document tree.

8. In which directory are the DBI scripts located?
a) cgi-inc
b) cgi-bin
c) cgi-usr
d) cgi-perl
View Answer

Answer: b
Explanation: DBI scripts are located in a cgi-bin directory located outside of document tree. The PHP scripts are different from DBI scripts since PHP scripts are located within the web server document tree.
advertisement

9. Which is the stored program associated with a schedule?
a) Trigger
b) Event
c) Stored function
d) Stored procedure
View Answer

Answer: b
Explanation: The MySQL version 5.1.6 and above has an event scheduler. It enables us to perform time activated database operations. An event is a stored program that is associated with a schedule.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, 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.