MySQL Questions and Answers – Controlling How the Server Listens for Connections

This set of 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
View Answer

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

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

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

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

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: ‘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
View Answer

Answer: a
Explanation: 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
View Answer

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

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

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

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

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

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

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice MySQL Question Bank, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

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.