MySQL Database Multiple Choice Questions 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
Answer: d
Clarification: 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
Answer: a
Clarification: 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
Answer: b
Clarification: 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’.
4. Which data directory subdirectory corresponds to the nbdinfo database?
a) mysql
b) performance_schema
c) sys
d) nbdinfo
Answer: b
Clarification: 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
Answer: a
Clarification: 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
Answer: b
Clarification: 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
Answer: d
Clarification: 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.
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
Answer: a
Clarification: 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
Answer: a
Clarification: 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.
10. An embedded application includes the server side and client side.
a) True
b) False
Answer: a
Clarification: 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.
