MySQL Questions and Answers – Running Multiple Servers

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Running Multiple Servers”.

1. OS imposes per process limits on the number of open file descriptors.
a) True
b) False
View Answer

Answer: a
Explanation: OS imposes per process limits on the number of open file descriptors. If the system makes it difficult to raise the limit, running multiple instances of the server binary is done.

2. The option that supplies the pathname to root directory of MySQL installation is _____________
a) –basedir
b) –datadir
c) –port
d) –socket
View Answer

Answer: a
Explanation: The option ‘–basedir’ has the purpose to specify the pathname to the root directory of the MySQL installation. The pathname to the data directory is specified by the option ‘–datadir’.

3. The log enabled by –relay-log-index is _____________
a) relay log index
b) relay log
c) binary log
d) error log
View Answer

Answer: a
Explanation: The system variable ‘time_zone’ represents the default time zone of the MySQL server. By default, this variable is set to ‘SYSTEM’ which means to use the system_time_zone setting.
advertisement
advertisement

4. What is the storage size in bytes required for the MEDIUMINT datatype?
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: c
Explanation: The numeric datatypes used in MySQL vary over ranges. There are a variety of INT types in the type specification. TINYINT requires 1, SMALLINT requires 2 bytes and MEDIUMINT requires 3.

5. What is the size of the BIT type?
a) 1
b) 2
c) 3
d) variable
View Answer

Answer: d
Explanation: All the numeric datatypes used in MySQL vary over the fields. However, the maximum size is fixed. Unlike the other numeric types, the size of the BIT datatype depends on the length of the field.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is the synonym for REAL?
a) FLOAT
b) INT
c) DOUBLE
d) BIT
View Answer

Answer: c
Explanation: The REAL datatype, by default, is for the DOUBLE type. Floating point types can be defined as UNSIGNED. This eliminates the negative end of the type ranges. MySQL has a variety of default types.

7. Execution on a time activated basis according to a schedule is done by _____________
a) Stored program
b) Events
c) Triggers
d) Stored procedures
View Answer

Answer: b
Explanation: In MySQL, the events execute on a time activated basis according to a schedule. Triggers are defined to execute when the table is modified via INSERT, DELETE or UPDATE statements.
advertisement

8. Stored programs degrade database security.
a) True
b) False
View Answer

Answer: b
Explanation: Stored programs improve database security because controlled access can be enabled to sensitive data by appropriate selection of the privileges a program has when it executes.

9. The character that the MySQL client program recognizes as a statement delimiter is ______________
a) :
b) .
c) ;
d) ,
View Answer

Answer: c
Explanation: By default, mysql itself recognizes the semicolon as a statement delimiter, so the delimiter must be redefined temporarily to cause mysql to pass the entire stored program definition to the server.
advertisement

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.

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.