Answer MySQL Certificate 1
Answer MySQL Certificate 1
A. In addition to databases, backups can include any related files, such as log or
configuration files.
B. They can be run only against a running MySQL server.
C. They can be performed while the MySQL server is not running.
D. They consist of exact copies of database directories and files.
E. Backup and restore granularity is available at the server level, database level,
or table level for any storage engine.
F. They are machine independent and highly portable.
G. They can be created by mysqlbackup for InnoDB tables or by file-system
commands, such as cp, scp, tar, or rsync, for MyISAM tables.
Answer: B,E,F
2. Which two statements are true about MySQL server multi-source replication?
Answer: E,F
Answer: A
1
4. Which statement is true about the my.ini file on a Windows platform while
MySQL server is running?
A. MySQL server does not use the my.ini option file for server configuration
options.
B. The option file is read by the MySQL server service only at start up.
C. Using SET PERSIST will update the my.ini file.
D. Editing the file will immediately change the running server configuration.
6. You must export data from a set of tables in the world x database.
Examine this set of tables:
Tables (country, countryinfo, location)
Which two options will export data into one or more files?
2
mysql> SELECT * INTO OUTFILE '/output/countryinfo.txt' FROM
world_x.countryinfo; mysql> SELECT * INTO OUTFILE '/output/location.txt'
FROM world_x.location;
7. How can mysql_multi be configured to allow MySQL instances to use the same
port number?
8. You use the InnoDB engine and the innodb_file_per_table option is set.
You delete a significant number of rows from a large table named
FACTORY.INVENTORY.
Now you must reorganize the physical storage for table data and associated
index data for the INVENTORY table to reduce storage space and improve I/O
efficiency.
Which command will do this?
A. mysql.ibd
B. ib_buffer_pool
C. ibtmp1
D. undo_001
E. ibdata1
3
F. ib logfile0
4
10. Where is the default data directory located after installing MySQL using RPM
on Oracle Linux 7?
A. /usr
B. /var/lib/mysql
C. /usr/mysql
D. /usr/bin
E. /etc/my.cnf
11. Which two queries are examples of successful SQL injection attacks?
12. Which are two of the components of MySQL InnoDB Cluster that help to
achieve database high availability?
5
13. Table t is an InnoDB table.
Examine these statements and output:
7
15. You must review configuration options for a new, large, busy reporting data
warehousing MYSQL instance.
Examine this parameter:
[mysql]
innodb_data_file_path=
Which are two configurations either of which would satisfy long-term storage
demands?
A. ibdatal1:12M
B. ibdatal:12M;ibdata2:12M: autoextend
C. ibdata1:12M;/tmp/ibdata2:12M:autoextend
D. ibdata1:12M:autoextend; ibdata2:12M:autoextend
E. ibdatal:12M;ibdata2:12M; ibdata3:12M
F. ibdatal:12M:autoextend
16. Your MySQL server was upgraded from an earlier major version.
The sales database contains three tables, one of which is the transactions table,
which has 4 million rows.
You are running low on disk space on the datadir partition and begin to
investigate.
# ls -l | grep ib
-rw------- 1 mysql mysql 3287 Dec 12 07:54 ib_buffer_pool
-rw------- 1 mysql mysql 12582719292 Dec 12 09:50 ibdata1
-rw------- 1 mysql mysql 50331648 Dec 12 09:50 ib_logfile0
-rw------- 1 mysql mysql 50331648 Dec 11 14:05 ib_logfile1
-rw------- 1 mysql mysql 12582912 Dec 12 08:05 ibtmp1
-rw------- 1 mysql mysql 25165824 Dec 12 09:50 mysql.ibd
8
# ls -l sales/
total 544
-rw-r----- 1 mysql mysql 47550136 Dec 12 09:50 sales.ibd
-rw-r----- 1 mysql mysql 114688 Dec 11 14:33 leads.ibd
Examine these MySQL status and global variables taken after profiling:
Com_rollback | 85408355
Com_commit | 1242342
Innodb_buffer_pool_pages_free | 163840
[mysqld]
buffer_pool_size=20G
innodb_flush_log_at_trx_commit=2
disable-log-bin
Which two changes will provide the most benefit to the instance?
9
A. buffer_pool_size=24G
B. innodb_doublewrite=0
C. innodb_flush_log_at_trx_commit=1
D. max_connections=10000
E. innodb_log_file_size=1G
F. sync_binlog=0
connection_control_min_connection_delay=1000
10
connection_control_max_connection_delay=2000
The minimum and maximum delays must be increased to 3000 and 5000,
respectively.
Now examine this command which is invoked:
A. An error is returned.
B. The minimum connection value is changed to 2000.
C. The minimum value increases to 3000 and the maximum value increases to
4000.
D. Only the minimum connection value is increased to 3000.
A. The relay logs from the master should be used to replace the corrupted relay
logs.
B. The slave relay logs should be deleted; execute CHANGE MASTER to adjust the
replication relay log file name, then issue START SLAVE;
C. The slave relay logs should be deleted; then execute START SLAVE;
D. The slave needs to be restored from backup.
11
23. Examine the GTID information from both master and slave:
Master:
gtids_executed:
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-321,
bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:1-50,
cccccccc-cccc-cccc-cccc-cccccccccccc:1234-1237
gtids_purged:
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-100,
bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb:1-10,
cccccccc-cccc-cccc-cccc-cccccccccccc:1234-1237
Slave:
gtids_executed:
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-160,
cccccccc-cccc-cccc-cccc-cccccccccccc:1234-1237
gtids_purged:
aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-70,
cccccccc-cccc-cccc-cccc-cccccccccccc:1234-1237
A. The instance deployed on host3 is expelled from the cluster and must be
rejoined using cluster.addInstance('host3:3377').
B. The instance deployed on host2 is elected as the new primary instance.
C. A subsequent failure of the instance deployed on host1 provokes an outage.
D. You can choose a new primary instance by using the command
cluster.setPrimaryInstance(<host>:<port>).
E. The instance deployed on host3 will automatically rejoin the cluster when
connectivity is re-established.
27. All MySQL Server instances belonging to InnoDB Cluster have SSL configured
and enabled.
You must configure InnoDB Cluster to use SSL for group communication.
Which two statements are true?
A. If only some InnoDB Cluster members are enabled for SSL group
communication, and --ssl-mode=PREFERRED, communication will fall back to
unencrypted connection.
B. An InnoDB Cluster must be dissolved and created from scratch to enable SSL
for group communication.
C. SSL group communication can be enabled for a cluster, one instance at a time,
by setting group_replication_ssl_mode.
D. SSL group communication must be enabled at cluster creation time by
specifying createCluster({memberSslMode:'REQUIRED'}).
E. SSL group communication requires the use of an additional set of parameters
group_replication_recovery_*.
28. Which two methods can be used to determine whether a query uses the hash
join algorithm?
A. EXPLAIN FORMAT=TREE
B. EXPLAIN ANALYZE
C. EXPLAIN FORMAT=JSON
D. EXPLAIN FORMAT=TRADITIONAL
E. EXPLAIN without any formatting argument
14
29. Examine this query and output:
mysql> EXPLAIN ANALYZE
SELECT city.CountryCode, country.Name AS Country_Name,
city.Name, city.District, city.Population
FROM world.city
INNER JOIN world.country ON country.Code = city.CountryCode
WHERE country.Continent = 'Asia'
AND city.Population > 1000000
ORDER BY city.Population DESC\G
Output:
-> Sort: <temporary>.Population DESC (actual time=8.306..8.431 rows=125
loops=1)
-> Stream results (actual time=0.145..8.033 rows=125 loops=1)
-> Nested loop inner join (cost=241.12 rows=205) (actual time=0.141..7.787
rows=125 loops=1)
-> Filter: (world.country.Continent = 'Asia') (cost=25.40 rows=34) (actual
time=0.064..0.820 rows=51 loops=1)
-> Table scan on country (cost=25.40 rows=239) (actual
time=0.059..0.359 rows=239 loops=1)
-> Filter: (world.city.Population > 1000000) (cost=4.53 rows=6) (actual
time=0.030..0.131 rows=2 loops=51)
-> Index lookup on city using CountryCode
(CountryCode=world.country.Code) (cost=4.53 rows=18) (actual
time=0.023..0.096 rows=35 loops=51)
15
30. You are planning to take a full MySQL instance backup.
Which two factors will help to determine the backup strategy?
A. Sort the “Exec” column and check for SQL queries with high Query Response
Time index (QRTi) values.
B. Sort the “Exec” column and check for SQL queries with low Query Response
Time index (QRTi) values.
C. Look for queries with big prolonged spikes in row activity/access graph in the
times series graph.
D. Look for queries with low total latency times in the Latency section in the
times series graph.
34. Which two tools or statements can be used to monitor the global status of
InnoDB locking?
A. SHOW STATUS;
B. INFORMATION_SCHEMA.INNODB_METRICS
C. INFORMATION_SCHEMA.INNODB_TABLESTATS
D. SHOW ENGINE INNODB STATUS;
E. SHOW TABLE STATUS;
F. INFORMATION_SCHEMA.STATISTICS
17
Which are two of the storage engines that would return a nonempty recordset for
the test table when executing the statements?
A. NDB
B. MEMORY
C. InnoDB
D. BLACKHOLE
E. ARCHIVE
36. The languages table uses InnoDB and the countries table uses the MyISAM
storage engine.
Both tables are empty.
Examine these statements:
BEGIN;
INSERT INTO languages(lang) VALUES("Italian");
INSERT INTO countries(country) VALUES("Italy");
ROLLBACK;
37. Which two statements are true about MySQL Enterprise Firewall?
A. System tables named firewall_users and firewall_whitelist in the mysql
database provide persistent storage of firewall data.
B. On Windows systems, it is controlled and managed using the Windows Internet
Connection Firewall control panel.
C. It shows only notifications for blocked connections, which originated outside of
your network's primary domain.
D. Firewall functionality is dependent on SHA-256 and ANSI-specific functions
built into the mysql.firewall table.
E. It provides INFORMATION_SCHEMA tables that enable views into firewall data.
38. What is the correct syntax for using transparent data encryption with an
InnoDB table?
A. ALTER TABLE t1 SET TDE = 'ON';
B. ALTER TABLE t1 WITH ENCRYPTION USING MASTER KEY;
18
C. ALTER TABLE t1 ADD ENCRYPTED_TABLESPACE = 'Y';
D. ALTER TABLE t1 ENCRYPTION=’Y’;
39. You have configured MySQL Enterprise Transparent Data Encryption (TDE).
What command encrypts a table?
40. Which statement is true about displaying and retrieving data with MySQL
Enterprise Monitor Query Analyzer?
A. The Query Analyzer graph view range selector can extend to cover the same
hour over multiple days.
B. It is possible to filter a Query Analyzer view graph by database and by table.
C. It is possible to export statements included in a graph selection in CSV format.
D. The Query Analyzer can plot a CPU utilization graph for remote hosts with a
MySQL Enterprise Service Manager’s built-in Agent installation.
41. Which are two of the settings that control global buffers shared by all threads
on a MySQL server?
A. innodb_buffer_pool_size
B. read_buffer_size
C. table_open_cache
D. sort_buffer_size
E. tmp_table_size
42. Which statement enables all roles granted to all users automatically?
19
43. Examine this SQL statement:
UPDATE world.city
SET Population = Population * 1.1
WHERE CountryCode IN (SELECT Code FROM world.country
WHERE Continent = 'Asia');
Which set of privileges will allow Tom to execute this SQL statement?
A.
GRANT ALL PRIVILEGES ON `world`.`city` TO 'tom'@'%';
GRANT SELECT (`code`) ON `world`.`country` TO 'tom'@'%';
B.
GRANT UPDATE ON `world`.`city` TO 'tom'@'%';
GRANT SELECT ON `world`.`country` TO 'tom'@'%';
C.
GRANT UPDATE ON `world`.`city` TO 'tom'@'%';
GRANT SELECT ON `world`.* TO 'tom'@'%';
D.
GRANT UPDATE ON `world`.* TO 'tom'@'%';
GRANT ALL PRIVILEGES ON `world`.`country` TO 'tom'@'%';
44. Which are two of the requirements for a secure MySQL Server environment?
20
A. All connections will use the original join_buffer_size value after MySQL Server
restarts.
B. All connections will use the new join_buffer_size value after MySQL Server
restarts.
C. Only new connections will use the new join_buffer_size value.
D. All connections will use the new join_buffer_size value.
E. Only the current connection will use the new join_buffer_size value.
47. Which two statements are true about the data dictionary object cache?
48. Which three are types of information stored in the MySQL data dictionary?
A. Performance metrics
B. access control lists
C. stored procedure definitions
D. view definitions
E. server configuration rollback
F. server runtime configuration
G. InnoDB buffer pool LRU management data
49. You are investigating performance problems in a MySQL database where all
data fits in memory. You determine that SELECTs from one table are the main
cause for poor response times. Which two actions are likely to fix the problem?
A. You use the InnoDB storage engine for most common tables.
B. The InnoDB buffer pool is full.
C. You use the MyISAM storage engine for most common tables.
D. Your table accesses wait for OS flush.
E. You use transactions extensively.
51.
Examine this command, which executes successfully:
22
52. Examine this partial output for InnoDB Cluster status:
"topology": {
"host1:3377": {
"address": "host1:3377",
"mode": "R/W",
[...]
"status": "ONLINE",
"version": "8.0.18"
},
"host2:3377": {
"address": "host2:3377",
"mode": "R/O",
[...]
"status": "(MISSING)"
},
"host3:3377": {
"address": "host3:3377",
"mode": "R/O",
[...]
"status": "ONLINE",
"version": "8.0.18"
}
}
23
53. A valid raw backup of the shop.customers MyISAM table was taken.
You must restore the table.
54. Which two statements are true about raw binary backups?
A. It will force the load of the audit plugin even in case of errors at server start.
B. It prevents the audit plugin from being removed from the running server.
C. It prevents the audit log from being removed or rotated.
D. It causes the audit log to be created if it does not exist.
A. It fails if you do not have the ADMIN OPTION of the roles r_role1 and r_role2.
B. It fails if any of the roles is specified in the mandatory_roles variable.
C. Existing connections can continue to use the roles' privileges until they
reconnect.
D. You must revoke r_role1 and r_role2 from all users and other roles before
dropping the roles.
E. It fails if at least one of the roles does not exist.
F. You must revoke all privileges from r_role1 and r_role2 before dropping the
roles.
58. Which two are valid uses for binary logs on a MySQL instance?
A. point-in-time recovery
B. replication
C. audit of all queries
D. recording the order in which queries are issued
E. logging the duration and locks for all queries
60. Examine these commands, which execute successfully on the ic1 host
mysqlsh> dba.createCluster('cluster1', {memberWeight:35})
mysqlsh> var mycluster = dba.getCluster()
mysqlsh> mycluster.addInstance('ic@ic2', {memberWeight:25})
mysqlsh> mycluster.addInstance('ic@ic3', {memberWeight:50})
Now examine this configuration setting, which is the same on all nodes:
group_replication_consistency=BEFORE_ON_PRIMARY_FAILOVER
Primary node ic1 fails.
A. Node ic2 becomes the new primary and is ignored until any backlog of
transactions is completed.
B. Node ic2 becomes the new primary and current transactions are considered
stale and rolled back.
C. Only two nodes remain so the election process is uncertain and must be done
manually.
D. Node ic3 becomes the new primary and current transactions are considered
stale and rolled back.
E. Node ic3 becomes the new primary and is ignored until any backlog of
transactions is completed.
26
62. You want to log only the changes made to the database objects and data on
the MySQL system.
Which log will do this by default?
A. error log
B. audit log
C. slow query log
D. binary log
E. general query log
27
Thi lượt 2
28. You must store connection parameters for connecting a Linux-based MySQL
client to a remote Windows-based MySQL server listening on port 3309.
Which are three of the methods that can be used to configure user, host, and
database parameters?
A. Configure.my.cnf.
B. Use the usermod program to store static user information.
C. Embed login information into the SSH tunnel definition.
D. Configure environment variables.
E. Execute the mysqladmin command to configure the user connection.
F. Execute myagi config editor to configure the user connection.
G. Configure-/.ssh/config for public key authentication.
[mysqld]
log output FILE
slow_query_log
Long query_time-2.01
log_queries_not_using_indexes
You want to log queries that looked at a minimum of 5000 records and either took
longer than 5 seconds to run or did not use indexes.
Which contains all the settings that you need to add to or modify the slow log
configuration?
35. Which three methods are part of a 'scale up' approach to capacity planning?
40. Which are two of the actions that will secure a MySQL server from network-
based attacks?
42. Which three are types of information stored in the MySQL data dictionary?
A. Performance metrics
B. access control lists
C. stored procedure definitions
29
D. view definitions
E. server configuration rollback
F. server runtime configuration
G. InnoDB buffer pool LRU management data
44.Binary log events for the mydb1 schema must be copied to a different schema
name mydb2.
Which command will do this?
A. mysql.ibd
B. ib_buffer_pool
C. ibtmp1
D. undo_001
E. ibdata1
F. ib logfile0
66. There has been an accidental deletion of data in one of your MySQL
databases.
You determine that all entries in the binary log file after position 1797 must be
replayed.
Examine this partial command:
31
1. Examine this statement, which executes successfully:
Which change enables the query to succeed while accessing fewer rows?
A. ALTER TABLE world.city ADD SPATIAL INDEX (Name);
B. ALTER TABLE world.city ADD SPATIAL INDEX (Population);
C. ALTER TABLE world.city ADD INDEX (Population);
D. ALTER TABLE world.city ADD INDEX (Name);
E. ALTER TABLE world.city ADD FULLTEXT INDEX (Name);
F. ALTER TABLE world.city ADD FULLTEXT INDEX (Population);
Answer: C
Answer: A,C,E
32
3. You have configured GTID-based asynchronous replication with one master and
one slave.
A user accidentally updated some data on the slave.
To fix this, you stopped replication and successfully reverted the accidental
changes.
Examine the current GTID information:
You must fix GTID sets on the slave to avoid replicating unwanted transactions in
case of failover.
Which set of actions would allow the slave to continue replicating without
erroneous transactions?
A. RESET MASTER;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
C. RESET SLAVE;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-3820;
SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa—aaaaaaaaaaaa:1-10300;
D. RESET MASTER;
SET GLOBAL gtid_purged-aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-2312;
SET GLOBAL gtid_executed=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
E. RESET SLAVE;
SET GLOBAL gtid_purged=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1-10167;
Answer: D
33
4. The data in this instance is transient; no backup or replication will be required.
It is currently under performing.
The database size is static and including indexes is 19G.
Total system memory is 32G.
After profiling the system, you highlight these MySQL status and global variables:
A. innodb_flush_log_at_trx_commit=1
B. buffer_pool_size=24G
C. innodb_log_file_size=1G
D. sync_binlog=0
E. innodb_doublewrite=0
F. max_connections=10000
G. innodb_undo_directory=/dev/shm
Answer: A,C,F
34