250+ TOP MCQs on Setting Up Replication Servers and Answers

MySQL Database Multiple Choice Questions 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

Answer: c
Clarification: 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

Answer: b
Clarification: 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

Answer: c
Clarification: 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.

4. MySQL Enterprise Backup records details of each backup in _____________
a) history_backup
b) backup_history
c) backlog_history
d) history_backlog

Answer: b
Clarification: 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

Answer: a
Clarification: 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.

  250+ TOP MCQs on How MySQL Handles Invalid Data Values and Answers

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

Answer: d
Clarification: 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.

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

Answer: b
Clarification: 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

Answer: b
Clarification: 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.

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

Answer: b
Clarification: 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top