Q161.Examine this command, which executes successfully:
cluster.addInstance ( ‘@:’,{recoveryMethod: ‘clone’ 1})
Which three statements are true? (Choose three.)
A)The account used to perform this recovery needs the BACKUP_ ADMIN privilege.
B)A target instance must exist, then it will be provisioned with data from an instance already in the cluster and
joined to the cluster,
C)InnoDB tablespaces outside the datadir are able to be cloned.
D)It ls always slower than {recoveryMethod:‘incremental’ }.
E)A new instance is installed, initialized, and provisioned with data from an instance already in the cluster and
joined to the cluster.
F)InnoDB redo logs must not rotate for the duration of the execution; otherwise, the recovery will fail.
Answer:ABC
cluster.addInstance ( '<user>@<host>:<port>',{recoveryMethod: 'clone' 1})使用clone的方式添加实例,
选项A:需要BACKUP_ADMIN权限,参考:https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-innodb-cluster-working-with-clone.html
选项B:目标实例已存在,也就是说被添加的实例已经初始化完成了,然后就准备从集群中的某个节点clone数据
选项C:在datadir之外的表空间的数据也会被clone
选项D:增量不一定比clone快
选项E:参考B,要求实例已存在,而不是新实例安装初始化等等
选项F:CLONE复制会对redo进行归档,所以在clone运行期间,redo日志轮转了也不影响,该答案参考:https://blog.csdn.net/weixin_43756308/article/details/140490714
Q162.Examine this set of messages and responses:
host3:3377 ssl JS > dba. rebootClusterFromCompleteOutage ()
Reconfiguring the default cluster from completeoutage…
The instance’host1 :3377’’ was part of the cluster configuration.
Would you like to rejoin it to the cluster? [y/N] : y
The instance ‘host2 :3377’was part of the cluster configuration.
Would you like to rejoin it to the cluster? [y/N] : y
Dba.rebootClusterFromCompleteOutage :The active session instance isn’t the most updated in comparison with the
ONLINE instances of the Cluster’ s metadata. Please use the most up to date instance: ‘host1 :3377’.
(RuntimeError )
Which statement is true?
A)The instance deployed on host3 must be rebuilt with a backup from the primary instance.
B)The cluster is running and there is at least one ONLINE instance.
C)The instance deployed on host3 must be synchronized from a donor deployed on hos t1 by using thecommand
cluster.addInstance ( ‘host1:3377’ ).
D)It is possible to determine the most up-to-date instance by comparing different global transaction identifier (GTID)
sets with GTID SUBSET (set1, set2) .
E)The active session instance is invalid and must be re-created by using the command shell.connect( ‘host3:3377’) .
Answer:D
前面博客有这个题,可以往前翻翻
Q163.Consider an OLTP system with a high volume of concurrent INSERTS and UPDATES.
The overall MySQL Server performance has degraded with the addition of more users performing the same tasks.
What do you recommend?
A) Decrease innodb_lock_wait_timeout.
B) Enable innodb_api_disable_rowlock.
C) Set innodb_autoinc_lock_mode to 1.
D) Disable innodb_rollback_on_timeout.
Answer:C
选项A:innodb_lock_wait_timeout 减小 innodb_lock_wait_timeout 参数会缩短事务等待锁的时间,导致更多事务因超时而回滚,从而降低系统的吞吐量。对于高并发系统,这可能会增加锁竞争和回滚的开销,进一步降低性能。
选项B:启用 innodb_api_disable_rowlock 会禁用InnoDB的行级锁,退化为表级锁。这会显著增加锁的粒度,导致更多的锁冲突,降低并发性能。
选项C:通过将 innodb_autoinc_lock_mode 设置为1,可以减少自增键的锁竞争,提高高并发插入操作的性能。https://www.cnblogs.com/lizhaolong/p/16437320.html
选项D:禁用 innodb_rollback_on_timeout 参数会使得事务在等待锁超时后不会自动回滚。这可能导致数据库处于不一致状态,违反了事务的ACID特性,通常不推荐这样做
参考:https://www.cnblogs.com/lizhaolong/p/16437320.html
Q164.Examine this command and output:
root@dbhost: /var/lib/mysql# ls -al
total 540
drwxrwxr-x 1 mysql mysql 4096 Aug 22 14:07 .
drwxr-xr-x 1 root root 4096 May 22 00:42…
-rw-r- - ---- 1 mysql mysql 56 Aug 20 13:58 auto. cnf
drwxr-xr-x 1 mysql mysql 4096 Aug 21 10:28 accounting
-rw-r–r-- 1 mysql mysql 1112 Aug 20 13:58 ca.pem
-rw-r----- 1 mysql mysql 172040 Aug 22 14:07 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582919 Aug 22 14:07 ibdata1
-rw-r----- 1 mysql mysql 50331648 Aug 22 14:07 ib_logfile0
-rw-r----- 1 mysql mysql 50331648 Aug 20 13:47 ib_ ogfile1
-rw-r----- 1 mysql mysql 292292 Aug 22 14:07 ibtmp1
drwxr-x— 1 mysql users 4096 Aug 20 13:59 mysql
-rw-r----- 1 mysql mysql 64064 Aug 22 15:18 mysql-error.log
drwxr-x— 1 mysql mysql 4096 Aug 20 13:59 performance_schema
-rw-rw---- 1 mysql mysql 1680 Aug 20 13:59 private_key. pem
-rw-r–r-- 1 mysql mysql 452 Aug 20 13:59 public_key.pem
-rw-r–r-- 1 mysql mysql 1112 Aug 20 13:58 server-cert.pem
-rw------- 1 mysql mysql 1680 Aug 20 13:58 server-key.pem
drwxr-x— 1 mysql mysql 4096 Aug 20 13:59 sys
Which two options will improve the security of the MySQL instance? (Choose two.)
A)Remove group read/write privileges from the private_key.pem file.
B)Remove world read privileges from the server-cert.pem certificate file.
C)Change the group ownership of the mysql directory to the mysql user group.
D)Remove world read privileges from the public_key.pem file.
E)Change the parent directory owner and group to mysql.
F)Remove the world read/execute privilege from the accounting directory.
Answer:AF
Linux文件权限如下:
rwx rwx rwx(读 写 执行)
所有者 所属组 其他用户选项A:私钥文件 private_key.pem 目前具有组读写权限(rw-)。私钥应当保持高度机密,只允许所有者(mysql 用户)读取和写入。移除组读写权限可以防止其他用户或组访问私钥,从而提高安全性
选项B: 服务器证书文件 server-cert.pem 目前其他用户也具有读权限(r--)。该文件可以公开,通常不需要限制世界读权限。
选项C:mysql 目录的所属组已经是 mysql 用户组
选项D:公钥文件 public_key.pem 目前其他用户也有的读权限(r--)。公钥可以公开,通常不需要限制世界读权限
选项E: 父目录的所有者已经是 root,所属组是 root,这对系统目录来说是正常的。更改父目录的所有者和所属组到 mysql 是不合理的
选项F:accounting 目录其他用户也具有读和执行权限(r-x)。移除这些权限可以防止未授权用户访问该目录中的内容,从而提高安全性
Q165.A MySQL server is monitored using MySQL Enterprise Monitor’s agentless installation.
Which three features are available with this installation method? (Choose three.)
A)MySQL Replication monitoring
B)network-related information and network characteristics
C)MySQL Query Analysis data
D)CPU utilization
E)security-related advisor warnings
F)operating system memory utilization
G)disk usage and disk characteristics including disk advisors warnings
Answer:ACE
选项A:无代理安装方式可以监控 MySQL 复制状态和性能,属于基本监控功能。
选项B:无代理安装方式主要监控 MySQL 实例本身,不涉及网络相关信息
选项C:无代理安装方式支持查询分析功能,可收集和分析执行的 SQL 语句
选项D:无代理安装方式不监控操作系统层面的 CPU 使用率
选项E:无代理安装方式可以提供与安全性相关的建议和警告,帮助识别潜在安全问题
选项F:无代理安装方式不监控操作系统层面的内存使用情况
选项G:无代理安装方式不直接监控磁盘使用情况和磁盘特征
Q166.You have a MySQL system with 500 GB of data that needs frequent backups.
You use a mix of MylSAM and InnoDB storage engines for your data.
Examine your backup requirement:
The MySQL system being backed up can never be unavailable or locked to the client applications.
The recovery from the backup must work on any system.
Only 1 hour of data can be lost on recovery of the backup.
Which option fulfills all backup requirements?
A)Take a physical backup of the MySQL system.
B)Use the Clone Plugin to copy the data to another MySQL system.
C)Take a logical backup of the MySQL system.
D)Take your backup from a slave of the MySQL system.
Answer:D
选项A:物理备份通常需要短暂锁定数据库以确保备份一致性,这可能违反“系统不能不可用或对客户端应用加锁”的要求。
选项B:克隆插件创建数据库副本,但需要复制整个数据,对于500GB的数据量较大,且未提及如何保证在恢复时只丢失1小时数据
选项C:逻辑备份不会锁定数据库,可满足"零停机"要求。恢复时结合二进制日志可控制数据丢失在1小时内。但备份和恢复过程可能较慢,尤其对于大容量数据。
选项D:从从服务器备份不会影响主服务器的可用性,可满足"零停机'要求。结合二进制日志,可确保恢复时数据丢失不超过1小时。
Q167.A colleague complains about slow response time on your website.
Examine this query and output:
mysql> show global status like 'Table_ lock%' ;
+------------------------------+---------+
IVariable_name | Value l
+------------------------------+---------+
|Table_locks_immediate l 53148 |
| Table_locks_waited |17716 |
+------------------------------+---------+
2 rows in set (0.00 3ec)
What is the most likely cause for the high number of lock waits?
A)You use the MyISAM storage engine for most common tables.
B)You use the InnoDB storage engine and statements wait while data is inserted.
C)The Innodb Buffer pool is full.
D)Your table accesses wait for the operating system level flush.
Answer:A
Table_locks_immediate:产生表级锁定的次数,表示可以立即获取锁的查询次数,每立即获取锁,值加1
Table_locks_waited:出现表级锁定争用而发生等待的次数,此值较高说明存在较严重的表级锁争用情况。
Q168.Your MySQL installation is running low on space due to binary logs. You need to reduce your log space
usage urgently.
Which two sets of actions when completed will accomplish this? (Choose two.)
A)Use SET GLOBAL binlog_expire_logs_seconds= and restart the server.
B)Set binlog_expire_logs_seconds in my. cnf.
C)Set binlog_expire_logs_seconds = 0 in my. cnf and restart the server.
D)Use SET PERSIST binlog_expire_logs_seconds=.
E)Use PURGE BINARY LOGS to <binlog_ name>. .
F)Use SET GLOBAL binlog_expire_logs_seconds= and run the FLUSH BINARY LOGS command.
Answer:EF
根据题目需要紧急的减少日志使用的磁盘空间,所以在设置了binlog_expire_logs_seconds之后,需要立马进行flush。或者直接使用purge binary logs进行清理
Q169.Which two storage engines provide a view of the data consistent with the storage system at any
moment?(Choose two.)
A)MyISAM
B)NDB
C)MEMORY
D)ARCHIVE
E)InnoDB
Answer:BE
NDB和innodb提供了一致性视图,这两是事务型存储引擎
Q170.Examine Joe’s account:
CREATE USER ‘joe’@‘%‘IDENTIFIED BY ’ secret ,
GRANT ALL PRIVILEGES ON*.* TO ‘joe’@’%’
All existing connections for joe are killed.
Which two commands will stop joe establishing access to the MySQL instance
A)Alter USER ‘joe’@‘%‘ACCOUNT LOCK
B)AITER USER ‘joe’@’%’ SET password=‘invalid ’
C)REVOKE All PRIVGESON ON . FROM ‘joe’@’%’
D)REVOKE USAGE on . FROM ’ joe’@‘%’
E)ALTER USER ‘joe’@‘%’ IDENTIFIED BY ‘invalid’ PASSWORD EXPIRE
F)AlTER USER ‘joe’@‘%’ PASSWORD HISTORY 0
Answer:AE