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
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
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
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 _____________
a) history_backup
b) backup_history
c) backlog_history
d) history_backlog
View Answer
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
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
a) 0
b) 1
c) 2
d) 3
View Answer
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. PHP scripts are located in the web client document tree.
a) True
b) False
View Answer
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
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.
9. Which is the stored program associated with a schedule?
a) Trigger
b) Event
c) Stored function
d) Stored procedure
View Answer
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.
- Check Information Technology Books
- Check MySQL Books
- Apply for Programming Internship
- Practice Programming MCQs