This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Writing Clients That Include SSL Support”.
1. What enables encrypted connections to be established?
a) exec_stmt_ssl
b) exec_ssl_stmt
c) exec_stmnt_ssl
d) exec_ssl_stmnt
View Answer
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.
2. The exec_stmt_ssl is written in _______________
a) C++
b) C
c) Python
d) Perl
View Answer
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.
3. On failure, ‘mysql_query()’ returns _______________
a) 0
b) 1
c) -1
d) a non-zero value
View Answer
Explanation: Both of the functions named ‘mysql_query()’ and ‘mysql_real_query()’ return zero for statements that succeed. They return non zero for failure. A statement is successfully executed if the server accepts it.
4. Input handling cannot be customized with MySQL.
a) True
b) False
View Answer
Explanation: With mysql, raw SQL statements can be entered. With MySQL programs input methods can be provided for the user that are more intuitive and easier to be used. So input handling is customized.
5. By default, MySQL does not clip out of range numeric values to the nearest fit value.
a) True
b) False
View Answer
Explanation: For the numeric or TIME columns, the values that are outside the legal range are clipped to the nearest endpoint of the range. The resulting value is stored. This is the method to handle defaults for numerics.
6. Which mode prevents MySQL to perform full checking of date parts?
a) PREVENT_DATE_CHECK
b) STOP_DATES_CHECK
c) ALLOW_DATES_INVALID
d) ALLOW_INVALID_DATES
View Answer
Explanation: In MySQL, it is also possible to selectively weaken the strict mode in some places. If the ALLOW_INVALID_DATES SQL mode is enabled, MySQL doesn’t perform full checking of the date parts.
7. Which statement is used to determine the storage engine for individual tables?
a) SHOW TABLE STATUS
b) SHOW DEFAULT STATUS
c) SHOW STATUS OF TABLE
d) SHOW STATUS TABLE
View Answer
Explanation: MySQL provides a method to determine the storage engine for each table with the ‘SHOW TABLE STATUS’ statement. The output of this statement is the name of the storage engine indicator.
8. Which table in the ‘INFORMATION_SCHEMA’ stores information about storage engines and server plugins?
a) ENGINES, PLUGINS
b) FILES, PLUGINS
c) PLUGINS, STATISTICS
d) ENGINES, FILES
View Answer
Explanation: The ‘INFORMATION_SCHEMA’ is very useful in MySQL. It has many tables each serving its individual purpose. The storage engine information is stored in ENGINES and plugin information in PLUGINS.
9. How many of the following is (are) considered as a special character by ‘mysql_real_escape_string()’?
null byte, single quote, backslash
a) 3
b) 1
c) 2
d) 0
View Answer
Explanation: The characters that ‘mysql_real_escape_string()’ considers special are the null byte, single quote, double quote, ‘backslash’, ‘newline’, ‘carriage return’ and the ‘Control-Z’.
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
- Apply for Programming Internship
- Practice Programming MCQs
- Check MySQL Books