MySQL Questions and Answers – MySQL Programs

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

1. What exports table definitions and contents?
a) mysqldump
b) mysqladmin
c) mysqlimport
d) mysqlexport
View Answer

Answer: a
Explanation: In MySQL, some distributions include a set of some client programs. ‘mysqldump’ exports the table definitions and the contents. ‘mysqladmin’ performs adminisitrative tasks.

2. What loads data files into tables?
a) mysqldump
b) mysqladmin
c) mysqlimport
d) mysqlexport
View Answer

Answer: c
Explanation: ‘mysqlimport’ loads the data files into the tables. In MySQL, some distributions include a set of some client programs. ‘mysqldump’ exports the table definitions and the contents.

3. What performs administrative operations?
a) mysqldump
b) mysqladmin
c) mysqlimport
d) mysqlexport
View Answer

Answer: b
Explanation: In MySQL, some distributions include a set of some client programs. ‘mysqladmin’ performs the administrative operations. ‘mysqlimport’ loads the data files into the tables.
advertisement
advertisement

4. With MySQL programs, input handling can be customized.
a) True
b) False
View Answer

Answer: a
Explanation: With mysql, raw SQL statements can be entered. With MySQL programs input methods can be provided for the user that are more intuitive and easier to be used. So input handling is customized.

5. Input can be validated in MySQL programs.
a) True
b) False
View Answer

Answer: a
Explanation: Input provided by the user can be validated. For instance, dates can be checked to make sure they conform to the format that MySQL expects, or certain fields can be filled in to check.

6. Which option executes all SQL statements in a SQL script irrespective of the number of errors?
a) –ensure
b) –violent
c) –force
d) –run
View Answer

Answer: c
Explanation: If SQL queries in a file are run using mysql in batch mode, mysql either quits after the first error. If the –force option is specified all the queries are executed indiscriminately.

7. Which of these is used during MySQL setup?
a) mysqld_multi
b) mysql.server
c) mysqld_safe
d) comp_err
View Answer

Answer: d
Explanation: The program ‘comp_err’ is used during the MySQL build or the MySQL installation process. This program compiles the error message files from the error source files. The others are not run during startup.
advertisement

8. Which of these is not used to connect to the MySQL server?
a) mysql
b) mysqladmin
c) mysqlcheck
d) mysql_upgrade
View Answer

Answer: d
Explanation: mysql_upgrade is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary. It updates the grant tables with any changes that have been made in newer versions of MySQL.

9. Which program emulates the client load for a MySQL server?
a) mysqlslap
b) mysqldump
c) mysqladmin
d) mysqlimport
View Answer

Answer: a
Explanation: mysqlslap is a client program designed to emulate client load for a MySQL server. It reports the timing of each stage. It works as if multiple clients are accessing the server.
advertisement

10. Which program reads the statement from a binary log?
a) mysql_config
b) mysqlbinlog
c) mysqldump
d) mysqlimport
View Answer

Answer: b
Explanation: ‘mysqlbinlog’ is a utility program for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash.

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.