This set of MySQL Assessment Questions and Answers focuses on “Writing Clients That Include SSL Support”.
1. What enables encrypted connections to be established?
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 _______________
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 _______________
d) a non-zero value
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.
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. Which option executes all SQL statements in a SQL script irrespective of the number of errors?
Explanation: If SQL queries in a file are run using mysql in batch mode, mysql either quits after the first error. If the –force option is specified all the queries are executed indiscriminately.
6. By default, MySQL does not clip out of range numeric values to the nearest fit value.
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.
7. Which mode prevents MySQL to perform full checking of date parts?
Explanation: In MySQL, it is also possible to selectively weaken the strict mode at some places. If the ALLOW_INVALID_DATES SQL mode is enabled, MySQL doesn’t perform full checking of the date parts.
8. Which statement is used to determine storage engine for individual tables?
a) SHOW TABLE STATUS
b) SHOW DEFAULT STATUS
c) SHOW STATUS OF TABLE
d) SHOW STATUS TABLE
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.
9. 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
Explanation: The ‘INFORMATION_SCHEMA’ is a 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.
10. How many of the following is (are) considered as a special character by ‘mysql_real_escape_string()’?
null byte, single quote, backslash
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.