250+ TOP MCQs on Controlling How the Server Listens for Connections

MySQL Question Bank focuses on “Controlling How the Server Listens for Connections”.

1. The server listens on a network port for TCP/IP connections unless started with the option ______________
a) –networking
b) –skip-networking
c) –skip-networks
d) –quit-networking

Answer: b
Clarification: On all the platforms the server listens on a network port for the TCP/IP connections, unless and until it is started with the –skip-networking option. The default port number is 3306.

2. Which option is used to specify to the server the IP number of the server host on which the server should listen?
a) –verbose
b) –bind-address
c) –startup
d) –shutdown

Answer: b
Clarification: If the server host has more than one IP number, the server can be specified the one that it should use when listening for connections by starting it with a ‘–bind-address’ option.

3. The option used to specify the socket file pathname is ______________
a) –socket
b) –pathtosocket
c) –path_socket
d) –socket_pathfile

Answer: a
Clarification: The default socket file usually is ‘/tmp/mysql.sock’. Operating system distributions that include MySQL often use a different location. The –socket option is used to specify explicitly.

4. MySQL supports shared-memory connections on Windows.
a) True
b) False

Answer: a
Clarification: MySQL supports shared memory connections on Windows. This capability is disabled by default. In order to enable it, the server is started with the ‘–shared-memory’ option.

5. INFORMATION_SCHEMA is not based on the SQL standard.
a) True
b) False

Answer: b
Clarification: ‘INFORMATION_SCHEMA’ is another way to access information about the databases and their objects (metadata). It is based on the ‘SQL standard’, although some content is MySQL-specific.

6. The disk data that the FILES table in INFORMATION_SCHEMA stores is ____________
a) NDB
b) NBD
c) NBK
d) NCD

Answer: a
Clarification: The ‘INFORMATION_SCHEMA’ is a method to access information about the databases and its objects known as metadata. It has various tables that can be viewed with ‘SHOW’ statement.

7. In which table of INFORMATION_SCHEMA is the information about table index characteristics stored?
a) FILES
b) STATISTICS
c) SCHEMATA
d) VIEWS

Answer: b
Clarification: The ‘STATISTICS’ table in the ‘INFORMATION_SCHEMA’ stores information about the table index characteristics. ‘INFORMATION_SCHEMA’ is responsible for storing database metadata.

8. What is the join where all possible row combinations are produced?
a) INNER JOIN
b) OUTER
c) NATURAL
d) CARTESIAN

Answer: d
Clarification: In ‘cartesian product’, each row of each table is combined with each row in every other table to produce all possible combinations. This produces a very large number of rows since the number is the product of rows.

9. What is the clause that filters JOIN results called?
a) WHERE
b) SORT
c) GROUP
d) GROUP BY

Answer: a
Clarification: Sometimes the result of a join is very large and is not desirable. In these cases, the results can be filtered with the help of the ‘WHERE’ clause which is followed by a set of conditions.

10. What are CROSS JOIN and JOIN are similar to?
a) INNER JOIN
b) NATURAL JOIN
c) OUTER JOIN
d) CARTESIAN JOIN

Answer: a
Clarification: The joins ‘CROSS JOIN’ and ‘JOIN’ types are exactly similar to the ‘INNER JOIN’. The statements containing ‘INNER JOIN’ can replace it with ‘CROSS JOIN’ or ‘JOIN’ to get exactly the same result.

Leave a Reply

Your email address will not be published. Required fields are marked *