MySQL 8.0 OCP 1Z0-908 161-170题

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

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/83926.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

蓝桥杯1447 砝码称重

问题描述 你有一架天平和 N 个砝码&#xff0c;这 N 个砝码重量依次是 W1,W2,⋅⋅⋅,WN​。 请你计算一共可以称出多少种不同的重量&#xff1f; 注意砝码可以放在天平两边。 输入格式 输入的第一行包含一个整数 N。 第二行包含 N 个整数&#xff1a;W1,W2,W3,⋅⋅⋅,WN​…

金融量化智能体,如何开发一个有效的策略?

原创内容第887篇&#xff0c;专注智能量化投资、个人成长与财富自由。 本周重构了网站&#xff0c;升级了最新的回测引擎&#xff0c;以及升级了论坛。 策略年化210%&#xff0c;夏普比3.47&#xff0c;系统源代码及策略均可下载 年化37.5%&#xff0c;回撤控制在16.8%&…

JavaScript 性能优化:调优策略与工具使用

引言 在当今的 Web 开发领域&#xff0c;性能优化已不再是锦上添花&#xff0c;而是产品成功的关键因素。据 Google 研究表明&#xff0c;页面加载时间每增加 3 秒&#xff0c;跳出率将提高 32%。而移动端用户如果页面加载超过 3 秒&#xff0c;有 53% 的用户会放弃访问。性能…

为 Jenkins添加 Windows Slave远程执行 python项目脚本

测试环境 JAVA JDK 1.7.0_13 (jdk-7u13-windows-i586.exe) Jenkins Win11 64 python项目环境 实践操作 1、新建与配置结点 【系统管理】-> 【管理结点】-> 【新建结点】, 如上&#xff0c;输入结点名称&#xff0c;勾选 【Dumb Slave】&#xff0c;点击【OK】 说明&am…

基于springboot3 VUE3 火车订票系统前后端分离项目适合新手学习的项目包含 智能客服 换乘算法

​ 博主介绍&#xff1a;专注于Java&#xff08;springboot ssm 等开发框架&#xff09; vue .net php phython node.js uniapp 微信小程序 等诸多技术领域和毕业项目实战、企业信息化系统建设&#xff0c;从业十五余年开发设计教学工作 ☆☆☆ 精彩专栏推荐订阅☆☆☆☆☆…

btc交易所关键需求区 XBIT反弹与上涨潜力分析​​

在加密货币市场的浪潮中&#xff0c;狗狗币&#xff08;DOGE&#xff09;近期的走势吸引了众多投资者的目光。根据XBIT分析&#xff0c;狗狗币刚刚踏入关键需求区&#xff0c;此前虽从高点大幅下跌了10%&#xff0c;但XBIT去中心化交易所平台分析师认为&#xff0c;短期内它有望…

宝塔+fastadmin:给项目添加定时任务

一、定时任务脚本编写 1. 使用 shebang 声明执行器 #!/usr/bin/env php 这是 Unix/Linux 系统中脚本文件的标准开头。表示这个脚本使用系统环境变量中的 php 来执行。2. 定义 ThinkPHP 入口路径并加载框架 define(APP_PATH, __DIR__ . /../../application/); require __DIR__…

每日Prompt:自拍生成摇头娃娃

提示词 将这张照片变成一个摇头娃娃&#xff1a;头部稍微放大&#xff0c;保持面部准确&#xff0c;身体卡通化。[把它放在书架上]。

【Tools】neovim操作指南

Neovim 中最常见、最实用的操作, 主要针对C 开发需求&#xff1a; &#x1f680; 基础操作 操作快捷键说明保存:w 或 ZZ保存当前文件退出:q 或 ZQ退出当前窗口保存并退出:wq 或 ZZ保存并退出强制退出:q!不保存直接退出撤销u撤销上一步重做<C-r>重做撤销搜索/xxx向下搜索…

Visual Studio 制作msi文件环境搭建

一、插件安装 a. 插件寻找 在 Visual Studio 2017 中&#xff0c;如果你希望安装用于创建 MSI 安装包的插件&#xff0c;第一步是&#xff1a;打开 Visual Studio 后&#xff0c;点击顶部菜单栏中的 “工具”&#xff08;Tools&#xff09;&#xff0c;然后选择下拉菜单中的 “…

深入解析 OpenManus:开源 AI 智能体框架的技术原理与实践

深入解析 OpenManus&#xff1a;开源 AI 智能体框架的技术原理与本地部署指南 在当今人工智能快速发展的时代&#xff0c;智能体&#xff08;Agent&#xff09;技术正逐渐成为推动自动化和智能化的关键力量。OpenManus&#xff0c;由 MetaGPT 团队开发的开源 AI 智能体框架&am…

利用 SQL Server 作业实现异步任务处理,简化系统架构

在现代企业系统中&#xff0c;异步任务是不可或缺的组成部分&#xff0c;例如&#xff1a; 电商系统中的订单超时取消&#xff1b; 报表系统中的异步数据导出&#xff1b; CRM 系统中的客户积分计算。 传统的实现方式通常涉及引入消息队列&#xff08;如 RabbitMQ、Kafka&a…

ubuntu sh安装包的安装方式

ubuntu sh安装包的安装方式以Miniconda2为例 https://repo.anaconda.com/miniconda/ 如果需要python2.7版本可下载以下版本 Miniconda2-latest-Linux-x86_64.sh 打开终端输入安装命令 sudo sh Miniconda2-latest-Linux-x86_64.sh 然后按提示安装&#xff0c;注意安装位置 …

gRPC开发指南:Visual Studio 2022 + Vcpkg + Windows全流程配置

前言 gRPC作为Google开源的高性能RPC框架&#xff0c;在微服务架构中扮演着重要角色。本文将详细介绍在Windows平台下&#xff0c;使用Visual Studio 2022和Vcpkg进行gRPC开发的完整流程&#xff0c;包括环境配置、项目搭建、常见问题解决等实用内容。 环境准备 1. 安装必要组…

C#控制流

&#x1f9e9; 一、控制流概述 C# 中的控制流语句用于根据条件或循环执行代码块。它们是程序逻辑的核心部分。 ✅ 二、1. if、else if、else int score 85;if (score > 90) {Console.WriteLine("优秀"); } else if (score > 60) {Console.WriteLine("及…

你知道mysql的索引下推么?

在此之前&#xff0c;需要先明白mysql内部的一个大致结构&#xff0c;mysql内部大概是划分为3处&#xff0c;client客户端连接&#xff0c;server层&#xff0c;存储引擎层 索引下推是mysql5.6之后内部的一种索引优化手段。 比如现在我有一张表student表&#xff0c;字段有id&…

mysql的基础命令

1.SQL的基本概念 SQL 是用于管理和操作关系型数据库的标准编程语言。是所有关系型数据库&#xff08;如 MySQL、PostgreSQL、Oracle 等&#xff09;的通用语言。 SQL语句分类 DDL: Data Defination Language 数据定义语言 CREATE&#xff0c;DROP&#xff0c;ALTER DML: Da…

Python爬虫实战:研究加密参数的定位方法,实现逆向解密

一、引言 在数字化信息时代,网络数据成为重要的战略资源。Python 以其简洁的语法和丰富的库生态,成为网络爬虫开发的首选语言。然而,随着互联网安全防护意识的增强,网站普遍采用加密技术保护数据接口,如请求参数加密、会话验证、动态令牌等,这使得传统爬虫技术面临巨大挑…

轴承表面缺陷检测数据集VOC+YOLO格式3945张3类别

数据集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路径的txt文件&#xff0c;仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数)&#xff1a;3945 标注数量(xml文件个数)&#xff1a;3945 标注数量(txt文件个数)&#xff1a;3945 标注…

【51单片机中断】

目录 配置流程 1.在IE寄存器中开启总中断通道和需要的某中断通道 2.在TCON寄存器开启所用中断的触发方式 3.使用中断函数完成中断 4.若需要中断嵌套则在IP寄存器中配置 5.若需要使用串口的中断&#xff0c;则配置SCON寄存器 6.代码示例 配置流程 1.在IE寄存器中开启总…