MySQL DBA backups, replication Flashcards
Which program copies the databases from one server to another?
a) mysqldbcopy
b) mysqlcopydb
c) mysqlflushdb
d) mysqldbflush
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.
To use ‘mysqldbcopy’ which privileges are required on the source server?
a) CREATE
b) INSERT
c) UPDATE
d) SELECT
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.
The program that performs logical backups is _____________
a) mysqlimport
b) mysqldump
c) myslqpit
d) mysqllogic
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.
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
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.
Which client-side authentication plugin is available that enables clients to send passwords to the server without hashing or encryption.
a) mysql_nohash_password
b) mysql_clear_password
c) mysql_native_password
d) None of these
Answer: b
A client-side authentication plugin is available that enables clients to send passwords to the server as cleartext, without hashing or encryption. This plugin is built into the MySQL client library.
The MySQL server is poorly configurable.
a) True
b) False
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.
Multiple MySQL servers can be easily run on the same machine.
a) True
b) False
Answer: a
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.
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
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.
The primary resource managed by a MySQL instance is the data directory. Which of the following allows you to set the data directory at start up?
a) –pid-file=file_name
b) –general_log_file=file_name
c) –basedir=dir_name
d) –datadir=dir_name
Answer: d
The primary resource managed by a MySQL instance is the data directory. Each instance should use a different data directory, the location of which is specified using the –datadir=dir_name option.
If you have multiple MySQL installations in different locations, you can specify the base directory for each installation with the –basedir=dir_name option. This causes each instance to automatically use a different data directory, log files, and PID file because the default for each of those parameters is relative to the base directory.
For InnoDB tables in mysqldump an online backup that takes no locks on tables can be performed by ______________
a) –multiple-transaction
b) –single-transaction
c) –double-transaction
d) –no-transaction
Answer: b
Answer: b
Explanation: For InnoDB tables it is possible to perform an online backup that takes no locks on tables using the option ‘–single-transaction’ to ‘mysqldump’. The ‘mysqldump’ can make backups.
To reload a delimited text data file use ______________
a) mysqldump
b) mysqld
c) mysqlimport
d) mysqlnaive
Answer: c
Explanation: A way to create text data files along with files containing ‘CREATE TABLE’ statements for the backed up tables is to use ‘mysqldump’ with –tab. To reload a delimited text data file ‘mysqlimport’ is used.
Replication enables data from one MySQL database server to be copied to one or more MySQL database servers.
a) True
b) False
Answer: a
Explanation: Replication enables data from one MySQL database server (the master) to be copied to one or more MySQL database servers (the slaves). Replication is asynchronous by default.
SBR replication is ______________
a) Statement based
b) Row based
c) Column based
d) Table based
Answer: a
Explanation: There are two main kinds of replication format: Statement Based Replication (SBR) replicates entire SQL statements and Row Based Replication (RBR) replicates only the changed rows.
The library file that contains various portability macros and definitions is ______________
a) my_global.h
b) my_sys.h
c) mysql.h
d) my_local.h
Answer: b
Explanation: The ‘my_sys.h’ header file contains a variety of portability macros and definitions required for structures and functions. These structures and functions are used by the client library.
The header that should be included first is ______________
a) my_global.h
b) my_sys.h
c) mysql.h
d) my_local.h
Answer: a
Explanation: The file ‘my_global.h’ takes care of including several other header files that are likely to be generally useful, like ‘stdio.h’. It also includes Windows compatibility information.