当前位置: 首页 > news >正文

MySQL 8.0 OCP 英文题库解析(八)

Oracle 为庆祝 MySQL 30 周年,截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。

从今天开始,将英文题库免费公布出来,并进行解析,帮助大家在一个月之内轻松通过OCP认证。

微信图片_20250507171214.png

本期公布试题61~70

试题61:

Choose two.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? 
C)Use SET GLOBAL binlog_expire_logs_seconds=<value> and restart the server. [错误] 
D)Use SET PERSIST binlog_expire_logs_seconds=<value>. [错误] 
F)Set binlog_expire_logs_seconds in my.cnf. [错误] 
E)Set binlog_expire_logs_seconds = 0 in my.cnf and restart the server. [错误] 
A)Use PURGE BINARY LOGS to <binlog_name>. [正确] 
B)Use SET GLOBAL binlog_expire_logs_seconds=<value> and run the FLUSH BINARY LOGS 
command. [正确] 

解析

解析选择两个。由于二进制日志,您的 MySQL 安装空间不足。您需要紧急减少日志空间使用量。哪两组作完成后将完成此作?使用 PURGE BINARY LOGS 手动删除日志 (A) [正确]
SET GLOBAL binlog_expire_logs_seconds = 86400;设为 0 会禁用自动清理。B正确。C) 设置后重启服务器	
无需重启,SET GLOBAL 已实时生效,重启是冗余操作E) 设为 0 并重启	binlog_expire_logs_seconds=0 会 禁用自动清理,加剧空间问题	与目标矛盾F) 仅修改 my.cnf	配置文件需重启生效,无法紧急释放空间	
适合长期配置但非紧急处理D) 使用 SET PERSIST	
虽能持久化配置,但不会立即清理现有日志	

试题62:

The replication for master ad slave MySQL Server is up and running .The disk space occupied by the 
binary log files continues to grow.Which two methods mange this issue? 
C)Execute the PURGE BINARY LOGS statement. [正确] 
E)Set the binlog_expire_logs_seconds variable.  [正确] 
A)Execute the FLUSH LOGS statement. [错误] 
D)On the master server,disable binary logging by removing the --log-bin option [错误] 
B)Delete all binary log files manually a=on the file system to release storage space. [错误] 

解析

主从属 MySQL Server 的复制已启动并正在运行。二进制日志文件占用的磁盘空间继续增长。哪两种方法可以管理此问题?


A) FLUSH LOGS 仅滚动创建新日志文件,不删除旧日志。 [错误]
D) 移除--log-bin选项会禁用二进制日志,导致复制中断。 [错误]
B) 手动删除文件可能破坏复制一致性,应始终通过MySQL命令清理。 [错误]正确选项CE

试题63:

Choose two.You administer a three node, single primary InnoDB Cluster. Examine cluster.status() 
displayed here:\statusText\:\Cluster is ONLINE and can tolerate up to ONE failure.\ Which two 
statements are true? 
B)Reconfiguring the cluster as multi-primary, will increase tolerance to two failures. [错误] 
C)There is a quorum and transactions can be committed normally. [错误] 
D)If two instances crash, it will produce an outage. [正确] 
F)Shutting down two instances with the SHUTDOWN command will produce an outage. [正确] 
A)If two instances are unreachable because of network failure, the cluster will reconfigure to work 
with a single instance. [错误] 
E)Restarting an arbitrary instance will always provoke primary instance failover. [错误] 

解析

在管理一个三节点单主InnoDB集群时,根据 cluster.status() 显示的 “Cluster is ONLINE and can tolerate up to ONE failure”(集群在线,最多可容忍一个节点故障),以下两个说法是正确的:

B)Reconfiguring the cluster as multi-primary, will increase tolerance to two failures. [错误] 
将集群重新配置为多主模式(multi-primary)可提高容错能力至两个故障。 [错误]容错能力取决于投票节点数(Voting Members),与单主/多主模式无关。三节点集群始终最多容忍 1 个故障。C)There is a quorum and transactions can be committed normally. [错误] 
集群目前有仲裁(quorum),事务可以正常提交。 [错误]题目未提供当前在线节点数,仅说明集群最多容忍 1 个故障。若已有 1 个节点宕机,剩余 2 个节点可维持仲裁;但若 2 个节点宕机,则无仲裁。D)If two instances crash, it will produce an outage. [正确] 
如果两个实例崩溃,将导致服务中断。 [正确]F)Shutting down two instances with the SHUTDOWN command will produce an outage. [正确] 
使用 SHUTDOWN 命令关闭两个实例将导致服务中断。 [正确]A)If two instances are unreachable because of network failure, the cluster will reconfigure to work with a single instance. [错误] 
如果因网络故障导致两个实例不可达,集群将重新配置为单节点运行。 [错误]网络分区时,多数派(≥2 节点) 的一方会继续服务,少数派(1 节点) 会进入 ERROR 状态,不会自动降级为单节点集群(需人工干预)。E)Restarting an arbitrary instance will always provoke primary instance failover. [错误] 
重启任意实例总会触发主节点故障转移(failover)。 [错误]仅当主节点(Primary) 被重启时才会触发故障转移。重启从节点(Secondary)不会影响主节点。

试题64:

Choose two.Which two MySQL Server accounts are locked by default? 
C) any user created with a username, but missing the host name [错误] 
E) any user created without a password [错误] 
A) any new ROLE accounts [正确] 
B) any internal system accounts [正确] 
D) any user set as DEFINER for stored programs [错误] 

解析

在MySQL中,默认情况下,以下两种类型的账户会被锁定(即无法直接用于登录):

A) 任何新创建的ROLE账户 [正确]ROLE(角色) 在创建时默认处于锁定状态(account_locked = 'Y'),必须手动解锁后才能使用:CREATE ROLE admin_role; -- 默认锁定ALTER ROLE admin_role ACCOUNT UNLOCK; -- 需显式解锁B) 任何内部系统账户 [正确]MySQL安装时自动生成的系统账户(如 mysql.sys、mysql.session、mysql.infoschema)默认被锁定,仅用于内部服务(如系统视图、会话管理等),禁止用户登录。

试题65:

Examine this command, which executes successfully:mysqlpump --user=root --password > full_ backup.sql 
Which two databases will be excluded from this dump? C)information schema [正确] 
D)mysql [错误] 
E)sys [正确] 
A)world [错误] 
B)employee [错误]

解析

执行 mysqlpump --user=root --password > full_backup.sql 命令时,默认情况下会排除以下两个系统数据库:
正确答案:C) information_schema [正确]information_schema 是MySQL的元数据数据库,存储表、列、权限等系统信息,默认不会被导出(因为它是动态生成的,而非实际数据)。E) sys [正确]sys 是MySQL提供的性能诊断工具库,基于performance_schema,默认情况下也不会被mysqlpump导出。

试题66:

Choose threeWhich three commands can report all the current connections running on the MySQL 
server? 
C)SHOW FULL PROCESSLIST [正确] 
E)SHOW EVENTS [错误] 
G)SELECT * FROM information_schema.events [错误] 
H)SELECT * FROM sys.statement_analysis [错误] 
B)SELECT * FROM performance_schema.threads [正确] 
D)SELECT * FROM information_schema.processlist [正确] 
F)SELECT * FROM sys.metrics [错误] 
A)SELECT * FROM performance_schema.events_transactions_current [错误] 

解析

要查看当前所有的连接(connections),可以使用以下三种命令:

    SHOW FULL PROCESSLIST:直接查看所有连接(最常用)。performance_schema.threads:可筛选出用户连接线程。information_schema.processlist:以表形式返回连接信息。所以正确选项C B D 

试题67:

Choose three.Identify three functions of MySQL Enterprise Monitor. 
F)Centrally manage server configurations. [错误] 
C)Determine the availability of monitored MySQL servers. [正确] 
D)Centrally manage users. [错误] 
H)Create customized alerts and provide notification alerts. [正确] 
A)Analyze query performance. [正确] 
E)Start a MySQL Enterprise backup. [错误] 
G)Start and stop MySQL Server. [错误] 
B)Start a logical backup. [错误]

解析

MySQL Enterprise Monitor 的三个核心功能

C) Determine the availability of monitored MySQL servers. [正确]监控MySQL服务器可用性:实时检测数据库实例的运行状态(如是否在线、响应时间等)。H) Create customized alerts and provide notification alerts. [正确]自定义告警与通知:设置阈值(如CPU使用率、慢查询数量),触发邮件或短信告警。A) Analyze query performance. [正确]查询性能分析:通过Query Analyzer工具识别慢查询、优化SQL性能。

试题68:

Choose three.Which three actions will secure a MySQL server from network-based attacks? 
C)Use network file system (NFS) for storing data. [错误] 
D)Change the listening port to 3307. [错误] 
A)Construct a perimeter network to allow public traffic [错误] 
F)Allow connections from the application server only. [正确] 
E)Use MySQL Router to proxy connections to the MySQL server. [正确] 
B)Place the MySQL instance behind a firewall. [正确] 

解析

MySQL 服务器 免受 网络攻击 的 3 个正确措施

B) Place the MySQL instance behind a firewall. [正确]防火墙保护E) Use MySQL Router to proxy connections to the MySQL server. [正确]MySQL Router 代理连接:MySQL Router 作为中间层,隐藏真实的 MySQL 服务器 IP,并提供负载均衡和连接池功能,减少直接暴露风险。支持自动故障转移,提升安全性。F) Allow connections from the application server only. [正确]最小化网络访问:在 MySQL 的 my.cnf 中绑定内网 IP(如 bind-address = 192.168.1.2),或通过防火墙规则限制仅应用服务器可访问。C) Use network file system (NFS) for storing data. [错误]NFS 不安全:NFS 本身存在未加密传输和权限管理风险,不推荐用于 MySQL 数据存储(应使用本地存储或专用 SAN)。D) Change the listening port to 3307. [错误]端口隐蔽≠安全:攻击者可通过端口扫描发现新端口,真正安全需依赖防火墙和认证机制。A) Construct a perimeter network to allow public traffic. [错误]允许公网流量是高风险行为:除非必要,MySQL 应仅在内网运行,公网暴露需配合 VPN 或 SSH 隧道。

试题69:

Choose twoWhich two statements are true about MySQL server multi-source replication? 
A)It must use GTID replication. [错误] 
F)It relies on relay_log_recovery for resilient operations. [正确] 
C)It needs to be re-instanced after a crash to maintain consistency. [错误] 
B)It is not compatible with auto- positioning. [错误] 
E)It does not attempt to detect or resolve replication conflicts. [正确] 
D)It uses only time-based replication conflict resolution. [错误]

解析

F) It relies on relay_log_recovery for resilient operations. [正确]依赖 relay_log_recovery 确保恢复可靠性:多源复制中,从服务器(Slave)可能从多个主服务器(Master)接收数据,relay_log_recovery = ON(默认)可确保崩溃后正确恢复中继日志,避免数据不一致。若禁用此参数,崩溃后可能导致复制中断或数据错误。E) It does not attempt to detect or resolve replication conflicts. [正确]不自动检测或解决复制冲突:多源复制中,如果多个主服务器同时修改同一行数据,MySQL 不会自动解决冲突(需应用层设计避免冲突,如分片或业务逻辑隔离)。A) It must use GTID replication. [错误]GTID 不是必须的:多源复制支持基于二进制日志位置(file + position)和 GTID 两种模式,但 GTID 能简化故障恢复,推荐使用而非强制。C) It needs to be re-instanced after a crash to maintain consistency. [错误]无需重建实例:通过 relay_log_recovery 和正确的崩溃恢复机制,可恢复复制状态,无需重建从库。B) It is not compatible with auto-positioning. [错误]兼容自动定位(auto-positioning):若启用 GTID,多源复制完全支持 MASTER_AUTO_POSITION = 1。D) It uses only time-based replication conflict resolution. [错误]无内置冲突解决机制:MySQL 不提供时间戳或其他冲突解决策略,需应用层处理。

试题70:

Choose two.Which two statements are true about using MySQL Enterprise Monitor Query Analyzer? 
A)It is possible to retrieve a normalized statement, but never the exact statement that was executed. 
[错误] 
C)It is possible to import data into the Query Analyzer from heterogeneous sources, such as CSV. 
[错误] 
E)It is possible to configure the Query Analysis built-in advisor to get notified about slow query 
execution. [正确] 
B)The single query QRTi pie chart in the Query Analyzer view is based on the average execution of 
all statements. [错误] 
D)It is possible to list and analyze statements in an arbitrary graph range selection from timeseries 
graphs. [正确]

解析

E) It is possible to configure the Query Analysis built-in advisor to get notified about slow query execution. [正确]慢查询告警配置:Query Analyzer 内置顾问(Advisor)可设置阈值(如执行时间 > 2 秒),触发邮件或短信通知,帮助及时优化性能瓶颈。D) It is possible to list and analyze statements in an arbitrary graph range selection from time-series graphs. [正确]自定义时间范围分析:用户可以在时间序列图中自由选择时间段(如“过去 1 小时”或“特定高峰时段”),Query Analyzer 会列出该范围内的所有查询并提供详细分析(如执行次数、平均延迟)。A) It is possible to retrieve a normalized statement, but never the exact statement that was executed. [错误]
可以检索规范化的语句,但永远无法检索执行的确切语句。[错误]可获取原始语句:Query Analyzer 不仅提供规范化查询(去除参数值,如 SELECT * FROM users WHERE id = ?),还能查看实际执行的原始语句(如 SELECT * FROM users WHERE id = 123)。C) It is possible to import data into the Query Analyzer from heterogeneous sources, such as CSV. [错误]不支持外部数据导入:Query Analyzer 的数据来源是 MySQL 服务器的性能库(performance_schema),无法直接导入 CSV 或其他异构数据源。B) The single query QRTi pie chart in the Query Analyzer view is based on the average execution of all statements. [错误]QRTi 饼图基于选定查询:QRTi(Query Response Time Index)饼图展示的是单个查询在不同时间段内的响应时间占比,而非所有查询的平均值。

相关文章:

  • Oracle 的 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH 命令
  • Ubuntu16.04 Qt的安装与卸载
  • 模型压缩,AWQ与GPTQ量化方法分析
  • AG32VH 系列应用指南
  • 基于 ARIMA 与贝叶斯回归的时间序列分析:结合趋势季节性与不确定性量化(附 PyTorch 变分贝叶斯实现)
  • 线性回归原理推导与应用(八):逻辑回归二分类乳腺癌数据分类
  • BUCK电路利用状态空间平均法和开关周期平均法推导
  • 大模型 Agent 就是文字艺术吗?
  • 3par persona设置错误,linux I/O持续报错
  • 【golang】能否在遍历map的同时删除元素
  • 文章记单词 | 第106篇(六级)
  • Redis-基础-总结
  • OptiStruct结构分析与工程应用:吸声单元吸声材料基本性能指标
  • 连续质数和
  • hugging-face数据集快速下载
  • 使用compressorjs实现前端图片压缩
  • 怎么判断一个Android APP使用了KMM这个跨端框架
  • [Java恶补day4] 283. 移动零
  • 水利水电安全员考试的案例分析题一般涉及哪些方面的知识?
  • 4408. 李白打酒加强版(dp)
  • 厦门市住宅建设办公室网站/常见的网络营销策略都有哪些
  • 兰州市解封最新消息/seo服务建议
  • 深圳网站制作建设/关键字搜索引擎
  • wordpress禁止索引页面/巩义网站优化公司
  • 成都网站建设联系电话/郴州seo
  • 郑州做网站公司 卓美/网站seo是什么