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 _____________
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
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
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.
4. MySQL Enterprise Backup records details of each backup in _____________
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
c) Stored routines
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.
6. How many of the following languages can interface to bind to the C API of MySQL?
Perl, PHP, Python
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.
7. Which language is the core for APIs and communication in MySQL?
Explanation: In order to provide application development, MySQL provides a client library written in the C programming language. It enables the access of MySQL databases from a C program.
8. PHP scripts are located in the web client document tree.
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.
9. In which directory are the DBI scripts located?
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.
10. Which is the stored program associated with a schedule?
c) Stored function
d) Stored procedure
Explanation: The MySQL version 5.1.6 and above has an event scheduler. It enables 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.