MySQL Questions and Answers – Writing Clients That Include SSL Support

This set of MySQL Assessment Questions and Answers 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

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.

2. The exec_stmt_ssl is 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.

3. On failure, ‘mysql_query()’ returns _______________
a) 0
b) 1
c) -1
d) a non-zero value
View Answer

Answer: d
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.
advertisement
advertisement

4. Input handling cannot be customized with MySQL.
a) True
b) False
View Answer

Answer: b
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

Answer: b
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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

Answer: d
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

Answer: a
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.
advertisement

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

Answer: a
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
advertisement

a) 3
b) 1
c) 2
d) 0
View Answer

Answer: a
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 Assessment Questions, here is complete set of 1000+ Multiple Choice Questions and Answers.

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.