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
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
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
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.
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
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
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().
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
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
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().
8. The MySQL server is poorly configurable.
a) True
b) False
View Answer
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
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.
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
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]
- Practice Programming MCQs
- Check MySQL Books
- Check Information Technology Books
- Apply for Programming Internship