This set of MySQL Database Multiple Choice Questions & Answers (MCQs) 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
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
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
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.
4. It is required to have an access privilege for a database before selecting it with ‘USE’.
a) True
b) False
View Answer
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
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.
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
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
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.
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
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
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.
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.
- Check Information Technology Books
- Check MySQL Books
- Apply for Programming Internship
- Practice Programming MCQs