MySQL Questions and Answers – Arranging for MySQL Server Startup and Shutdown

This set of Tough MySQL Questions and Answers focuses on “Arranging for MySQL Server Startup and Shutdown”.

1. The error log file has a suffix ______________
a) .err
b) .er
c) .error
d) .log
View Answer

Answer: a
Explanation: In Windows, by default, the error log is located in the ‘C:\Program Files\MySQL\MySQL Server 5.7\data’ directory. It is the file with a suffix of .err, or may be specified by passing in the ‘–log-error’ option.

2. The option which finds the startup options supported by the server through mysqld is ______________
a) –verbose
b) –vertex
c) –startup
d) –shutdown
View Answer

Answer: a
Explanation: The statement ‘mysqld –verbose –help’ is used for finding out all the startup options that are supported by the server. It is possible to run the server manually or automatically.

3. Server startup can also be done by the ______________
a) option file
b) log file
c) error file
d) system file
View Answer

Answer: a
Explanation: The options are listed in an option file. Options specified in this way are given one per line. Only the long option form can be used and it is written without the leading dashes.
advertisement
advertisement

4. It is required to have an access privilege for a database before selecting it with ‘USE’.
a) True
b) False
View Answer

Answer: a
Explanation: In order to select a database as the default database for the MySQL server using the ‘USE’ statement, some access privilege for the database needs to be granted or attained.

5. The keyword used to create a database is __________
a) CREATE
b) SET
c) SETUP
d) LINK
View Answer

Answer: a
Explanation: The statement ‘CREATE DATABASE database_name;’ is used to create a database with the name ‘database_name’. A database qualifier should be used to specify the full name of the database.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which file is created by the server to store the database attributes?
a) db.otp
b) dp.zip
c) db.opt
d) db.cls
View Answer

Answer: c
Explanation: Whenever a database is created in MySQL, the MySQL server creates a directory with the same name as the database. It creates the file db.opt to store the attributes.

7. What is the default storage engine?
a) EXAMPLE
b) ARCHIVE
c) MyISAM
d) NDB
View Answer

Answer: c
Explanation: MySQL comes with multiple storage engines. The default storage engine used is ‘MyISAM’. ‘EXAMPLE’ is the stub storage engine, NDB is the storage engine for MySQL Cluster.
advertisement

8. The name of the format file for a table named my_tbl is __________
a) my_tbl.fmt
b) my_tbl.frm
c) my_tbl.fmr
d) my_tbl.ftm
View Answer

Answer: b
Explanation: Every time a table is created in MySQL, it creates a disk file containing the format of the table. It has two components, namely, base name (here, ‘my_tbl’) and an extension (here, ‘frm’).

9. In the CREATE TABLE statement, the engine name specified is case insensitive.
a) True
b) False
View Answer

Answer: a
Explanation: Suppose a table is created using the following statement: ‘CREATE TABLE my_tbl (…..) ENGINE = InnoDB;’. The engine name ‘InnoDB’ used is always case insensitive.
advertisement

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice tough questions and answers on all areas of MySQL, 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.