MySQL Questions and Answers – Copying Databases to Another Server

This set of MySQL MCQs focuses on “Copying Databases to Another Server”.

1. Which program copies the databases from one server to another?
a) mysqldbcopy
b) mysqlcopydb
c) mysqlflushdb
d) mysqldbflush
View Answer

Answer: a
Explanation: The utility program ‘mysqldbcopy’ is capable of copying databases from one server to another server. It can also prepare copies to make transfers on the same servers. This can be done simply by running the program.

2. To use ‘mysqldbcopy’ which privileges are required on the source server?
a) CREATE
b) INSERT
c) UPDATE
d) SELECT
View Answer

Answer: d
Explanation: To use the utility program ‘mysqldbcopy’, the user must have SELECT privileges for the database(s) on the source server and have CREATE, INSERT, UPDATE on the destination server.

3. The program that performs logical backups is _____________
a) mysqlimport
b) mysqldump
c) myslqpit
d) mysqllogic
View Answer

Answer: b
Explanation: The ‘mysqldump’ performs logical backups. It produces a set of SQL statements that are executed to reproduce the original database object definitions. It dumps one or more MySQL databases for backup.
advertisement
advertisement

4. In ‘mysqldump’ which option is used to make all tables in the destination databases to use a different storage engine?
a) –next-storage-engine
b) –new-storage-engine
c) –clear-storage-engine
d) –get-storage-engine
View Answer

Answer: b
Explanation: While using the program ‘mysqldump’ in MySQL to copy databases from server to server, all tables in the destination databases can be directed to use a different storage engine with the –new-storage-engine option.

5. Which function returns reference to hash of row values?
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer

Answer: d
Explanation: The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The function ‘fetchrow_hashref()’ returns reference to hash of row values keyed by ______________
a) row name
b) column name
c) table name
d) database name
View Answer

Answer: b
Explanation: The function ‘fetchrow_hashref()’ returns reference to hash of row values, keyed by the column name. The function ‘fetchrow_arrayref()’ returns a reference to an array of row values.

7. Which function returns reference to array of row values?
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer

Answer: b
Explanation: ‘fetchrow_arrayref()’ returns a reference to an array of row values. The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetch()’ is the same as fetchrow_arrayref().
advertisement

8. The MySQL server is poorly configurable.
a) True
b) False
View Answer

Answer: b
Explanation: The MySQL server is highly configurable. Some of the operational characteristics that you can control include which storage engines the server supports, the default character set, and its default time zone.

9. Multiple MySQL servers can be easily run on the same machine.
a) True
b) False
View Answer

Answer: b
Explanation: It is useful to run multiple servers on the same machine under certain circumstances. A new MySQL release can also be tested while leaving the current production server in place.
advertisement

10. Which is the log in which data changes received from a replication master server are written?
a) error log
b) general query log
c) binary log
d) relay log
View Answer

Answer: d
Explanation: The Relay Log has the data changes received from a replication master server written in it. The problems encountered during the starting, running or stopping of ‘mysqld’ is written in error log.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice MCQs 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.