MySQL Questions and Answers – Location of the Data Directory

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Location of the Data Directory”.

1. The option that specifies the data directory location at server startup is ______________
a) –data
b) –data_dir
c) –data-dir
d) –datadir
View Answer

Answer: d
Explanation: At the server startup the data directory location is specified by using a ‘–datadir=dir_name’ option. It is helpful for naming a location other than the compiled in default.

2. The datadir variable value can be seen using ______________
a) SHOW VARIABLES
b) DISP VARIABLES
c) CONNECT VARIABLES
d) SHOW VARIABLE
View Answer

Answer: a
Explanation: The data directory location is checked by the ‘datadir’ variable. It can be obtained using a ‘SHOW VARIABLES’ statement or a ‘mysqladmin’ variables command, like: SHOW VARIABLES LIKE ‘datadir’.

3. Which data directory subdirectory provides the information used to inspect the internal execution of the server at runtime.
a) mysql
b) performance_schema
c) sys
d) nbdinfo
View Answer

Answer: b
Explanation: The ‘performance_schema’ directory corresponds to the Performance Schema. It provides information used to inspect the internal execution of the server at runtime. The ‘sys’ directory maps to ‘nbdinfo’.
advertisement
advertisement

4. Which data directory subdirectory corresponds to the nbdinfo database?
a) mysql
b) performance_schema
c) sys
d) nbdinfo
View Answer

Answer: b
Explanation: The sys directory corresponds to the sys schema. It provides a set of objects to interpreting Performance Schema information. The ‘performance_schema’ directory corresponds to the Performance Schema.

5. Encrypted connections can be established using ______________
a) exec_stmt_ssl
b) exec_ssl_stmt
c) exec_stmnt_ssl
d) exec_ssl_stmnt
View Answer

Answer: a
Explanation: For the ‘exec_stmt_ssl’ to work properly, MySQL must have been built with SSL support, and the server must be started with the proper options that identify its certificate and key files.

6. What is exec_stmt_ssl written in?
a) C++
b) C
c) Python
d) Perl
View Answer

Answer: b
Explanation: In MySQL, the ‘sampdb’ distribution contains a source file named ‘exec_stmt_ssl.c’ from which the client program ‘exec_stmt_ssl’ can be built. There is a procedure to build this file.

7. What is the embedded server library containing the MySQL server linkable into applications?
a) libmysqla
b) libmysqlb
c) libmysqlc
d) libmysqld
View Answer

Answer: d
Explanation: MySQL includes an embedded server library, libmysqld, containing the MySQL server in a way that can be linked into applications. This enables the production of MySQL-based standalone applications.
advertisement

8. What is the embedded server library when building from source enabled by?
a) –with-embedded-server
b) –with-server-embedded
c) –with-embedded-library
d) –with-library-embedded
View Answer

Answer: a
Explanation: While building from the source, the embedded server library is enabled by using the option ‘–with-embedded-server’ while running ‘configure’. This applies equally to MySQL 5.0 and 5.1.

9. Multiple statement execution is not enabled by default.
a) True
b) False
View Answer

Answer: a
Explanation: The ‘multiple-statement’ execution is not enabled by default, so the server must be told that it is intended to be used. There are two ways to tell the server to enable the execution.
advertisement

10. An embedded application includes the server side and client side.
a) True
b) False
View Answer

Answer: a
Explanation: In MySQL, an embedded application includes both a client side and a server side, in order that it can process one group of options for the client and another group for the server.

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.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.