MySQL 8.0 OCP 1Z0-908 131-140题

news2025/5/17 13:25:44

Q131.You have upgraded the MySQL binaries from 5.7.28 to 8.0.18 by using an in-place upgrade.
Examine the message sequence generated during the first start of MySQL 8.0.18:
。。。[System]。。。/usx/sbin/mysqld (mysqld 8.0.18-commercial) starting as process 2754
。。。[System]。。。Starting upgrade of data directory. .
。。。[ERROR]。。。。Table upgrade required. Please do ‘’REPAIR TABLE ‘columns_ priv’" or dump/reload to
fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ‘event’” or dump/reload to fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ’proc’” or dump/reload to fix it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ’proxies_ priv’” or dump/reload to fix
it!
。。。[ERROR]。。。Table upgrade required. Please do “REPAIR TABLE ‘tables_ priv’” or dump/reload to fix it!
。。。[ERROR]。。。Failed to open mysql.event Table.
。。。[ERROR]。。。Failed to open mysql.proc Table.
。。。(ERROR]。。。Failed to Populate DD tables.
。。。[ERROR]。。。Aborting
。。。[System] 。。。 /usr/sbin/mysqld: shutdown complete (mysqld 8.0.18-commercial) MySQL Enterprise
Server - Commercial.
Which step or set of steps will resolve the errors?
A)Start mysqld again using the --upgrade=FORCE option.
B)Go to the /mysql directory and execute: myisamchk --update-state columns_ priv event proc
proxies_ priv tables_ priv.
C)Execute: mysqlcheck --repair mysql columns_ priv event proc proxies_ priv tables_ priv.
D)Remove the redo logs. Replace the MySQL binaries with the 5.7.28 binaries. Prepare the tables for upgrade.
Upgrade to 8.0.18 again.
E)Execute: mysqlcheck --check-upgrade mysql columns_priv event proc proxies_priv tables_ priv.
Answer:A
dd table是data dictionary

选项A:使mysql_upgrade已经在当前mysql版本上执行过,也忽略mysql_upgrade_info文件并强制执行mysql_upgrade
mysqlcheck只能检查和修复表中的是否违反唯一约束等这类问题,然后进行修复,故BCD都似乎错误的,E选项--check-upgrade只是检查一些权限,无法达到修复的目的

Q132.You plan to upgrade your MySQL 5.7 instance to version 8.
You have installed the 8 build of MySQL Shell.
Examine this command executed from the operating system shell prompt:
mysqlsh --uri root@localhost:3306 --util checkforserverupgrade
Which statement is true?
A)It documents any problems with your 5.7 tables to make them ready to upgrade to 8.
B)It fails because the operation name must be in camelCase.
C)It fixes any problems with your 5.7 tables to make them ready to upgrade to 8.
D)It is mandatory to clear the history of prior results before executing this process a second time or later.
E)It fails because checkForServerUpgrade must be executed only within an active shell session as a method of
the util object.
F)It is mandatory to run this command so that MySQL 8.0 software’s auto-upgrade process has the details it
needs to operate properly.
Answer:A

mysqlsh --uri root@localhost:3306 --util checkforserverupgrade可以检查从5.7到8升级过程中出现的不兼容,已弃用的特性等信息

选项A:会记录5.7升级到8.0会出问题的表,是正确的
选项B:选项大小写无所谓,更不用什么驼峰命名
选项C:只检查不修复
选项D:每一次执行都会有产生自己的信息,没必要清理之前执行后产生的结果
选项E:命令行也行
选项F:mandatory:必须,强制,该命令也不一定必须执行,只要有足够的信息,没有什么兼容性的问题,那就可以不执行

Q133.Database test contains a table named city that has the InnoDB storage engine.
CREATE TABLE ‘city’ (
‘ID’ int NOT NULL AUTO_ INCREMENT,
‘Name’ char(35) NOT NULL DEFAULT ‘’,
‘Countrycode’ char(3) NOT NULI DEFAULT ‘’,
‘District’ char (20) NOT NULI DEFAULT ’ ',
‘Population’ int NOT NULI DEFAULT ‘0’,
PRIMARY KEY(‘ID’),
KEY ‘CountryCode’ (
’ Countrycode’ )
) ENGINE= InnoDB TABLESPACE=innodb_file_per_table;
What is the content of the test folder in the data directory?
A)city.MYD, city.MYI, and city.sdi
B)city.ibd
C)city. ibd and city.sdi
D)city. ibd and city. frm
E)city.ibd, city.frm, and city.sdi
Answer:B

frm:是描述表结构的文件。在8.0之前包含MySQL表的元数据,例如表定义。元数据是关于数据的数据,表定义则包含了表的结构信息,像表中有多少列、每列的数据类型、列的名称等,在8.0之后,这些信息存储在数据字典表中
MYD:存储myIsam数据的文件
MYI:存储myIsam数据表的索引信息
ibd:包含innodb的表数据和索引文件
sdi:序列化数据目录信息(SDI),SDI是表和表空间对象的序列化元数据。,存储了innodb表的元数据,在表空间中存储
以上表中是innodb表,所以会有ibd文件,sdi存储在表空间中,所以在test数据库路径下看不到

Q134.Which two MySQL Shell commands are excluded from the InnoDB Cluster creation procedure?
A)cluster.addInstance()
B)dba.configureLocalInstance()
C)dba.checkInstanceConfiguration()
D)cluster.setPrimaryInstance()
E)dba.configureInstance 0)
F)dba.createCluster()
G)cluster.forceQuorumUsingPartitionOf()
Answer:DG

选项A:此命令用于将新实例添加到已创建的集群中,是集群创建和管理过程的一部分
选项B:此命令用于配置本地实例以加入集群,通常在创建集群之前或过程中使用
选项C:此命令用于检查实例是否适合加入集群,通常在创建集群之前使用。
选项D:此命令用于设置或更改集群的主实例,通常在集群创建之后用于管理集群,而不是集群创建过程的一部分
选项E:此命令用于配置实例以确保其适合加入集群,通常在创建集群之前使用。
选项F:此命令用于实际创建 InnoDB Cluster,是集群创建过程的核心步骤
选项G:此命令用于在网络分区或故障情况下强制设置仲裁,以恢复集群的正常运行,不属于常规的集群创建过程。

Q135.Which four connection methods can MySQL clients specify with the --protocol option when connecting to a
MySQL server?
A)IPv4
B)SOCKET
C)MEMORY
D)PIPE
E)IPv6
F)FILEO
G)TCP
H)DIRECT
Answer:BCDG

Q136.Which two authentication plugins require the plaintext client plugin for authentication to work?
A)LDAP authentication
B)SHA256 authentication
C)Windows Native authentication
D)PAM authentication
E)MySQL Native Password
F)LDAP SASL authentication
Answer:AD

Hashing or encryption cannot be done for authentication schemes that require the server to receive the password as entered on the client side. In such cases, the client-side mysql_clear_password plugin is used, which enables the client to send the password to the server as cleartext. There is no corresponding server-side plugin. Rather, mysql_clear_password can be used on the client side in concert with any server-side plugin that needs a cleartext password. (Examples are the PAM and simple LDAP authentication plugins; see Section 8.4.1.5, “PAM Pluggable Authentication”, and Section 8.4.1.7, “LDAP Pluggable Authentication”.)

对于那些需要服务器以客户端输入的形式接收密码的身份验证方案,无法进行哈希或加密。在这种情况下,客户端会使用mysql_clear_password插件,该插件允许客户端将密码以明文形式发送给服务器。没有对应的服务器端插件。相反,mysql_clear_password可以在客户端与任何需要明文密码的服务器端插件配合使用(例如PAM可插拔身份验证插件和简单的LDAP身份验证插件;

参考:https://dev.mysql.com/doc/refman/8.4/en/cleartext-pluggable-authentication.html

Q137.Where is the default data directory located after installing MySQL using RPM on Oracle Linux 7?
A)/usr
B)/usr/mysql
C)/etc/my.cnf
D)/var/lib/mysql
E)/usr/bin
Answer:D

Q138.You must store connection parameters for connecting a Linux-based MySQL client to a remote Windows-based MySQL server listening on port 3309.
Which four methods can be used to configure user, host, and database parameters?
A) Execute the command in a bash script.
B) Embed login information into the SSH tunnel definition.
C) Define a UNIX socket.
D) Execute mysql_config_editor to configure the user connection.
E) Configure~/.ssh/config for public key authentication.
F) Use the usermod program to store static user information.
G) Execute the mysqladmin command to confiaure the user connection.
H) Configure~/.my.cnf.

  1. Configure environment variables
    Answer:ADHI
可以使用bash脚本,mysql_config_editor工具,环境变量,或者配置在~/.my.cnf存储连接用户的名称,ip数据库等连接信息

Q139.You plan to install MySQL Server by using the RPM download.
Which two statements are true?
A)You must manually initialize the data directory.
B)You can provide the root password interactively.
C)The MySQL RPM package installation supports deploying multiple MySQL versions on the same host.
D)MySQL uses the RPM relocatable installation target feature.
E)You can find the root password in the error log after the first start.
F)The functionality is split among several RPM package files.
Answer:EF

RPM安装步骤:
1.下载RPM安装包
2.查看安装包:$> rpm -qpl mysql-community-server-version-distribution-arch.rpm
3.安装:$> sudo yum install mysql-community-{server,client,client-plugins,icu-data-files,common,libs}-*
4.启动:$> systemctl start mysqld
5.查看临时密码:$> sudo grep 'temporary password' /var/log/mysqld.log

从这个过程中可以看到,
选项A:不需要手动创建data路径
选项B:也不需要交互式的提供密码
选项C:RPM不支持单机多实例,因为需要不同的实例间需要不同的配置
选项D:RPM安装都是默认位置,也没有重新定位 安装目标路径
选项E:在error log中查看密码是正确的
选项F:功能分布在多个 RPM 软件包文件中。也是正确的,可以看到安装的时候需要安装不同的包

Q140.Examine this MySQL Shell command:
dba.rebootClusterFromCompleteOutage ()
Which two statements are true? (Choose two.)
A)It reconfigures InnoDB Cluster if the cluster was stopped.
B)It performs InnoDB Cluster instances rolling restart.
C)It only starts all InnoDB Cluster instances.
D)It is not mandatory that all instances are running and reachable before running the command.
E)It stops and restarts all InnoDB Cluster instances and initializes the metadata.
F)It only stops and restarts all InnoDB Cluster instances.
G)It picks the minimum number of instances necessary to rebuild the quorum and reconfigures InnoDB Cluster.
Answer:AD

rebootClusterFromCompleteOutage()是MySQL Shell中的一个实用命令,用于在 InnoDB 集群遇到完全中断 (例如,当组复制在所有成员实例上停止时)后重新配置和恢复集群。这个命令允许你连接到集群中的一个 MySQL 实例,并使用该实例的元数据来恢复整个集群。

选项A:正确
选项D:可以在某一个实例上运行该命令,所以不需要强制所有实例都是running状态和可达的

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

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

相关文章

DBF Converter:高效转换DBF文件,满足多样化数据处理需求

DBF Converter 是一款功能强大的数据转换工具,专为需要将DBF文件转换为其他格式的用户设计。它支持将DBF文件转换为CSV、Excel、HTML、SQL等多种常见格式,满足用户在不同场景下的数据处理需求。无论是数据迁移、报表生成还是日常数据处理,DBF…

Jmeter 安装包与界面汉化

Jmeter 安装包: 通过网盘分享的文件:CSDN-apache-jmeter-5.5 链接: https://pan.baidu.com/s/17gK98NxS19oKmkdRhGepBA?pwd1234 提取码: 1234 Jmeter界面汉化:

【C++】 —— 笔试刷题day_29

一、排序子序列 题目解析 一个数组的连续子序列,如果这个子序列是非递增或者非递减的;这个连续的子序列就是排序子序列。 现在给定一个数组,然后然我们判断这个子序列可以划分成多少个排序子序列。 例如:1 2 3 2 2 1 可以划分成 …

MongoTemplate 基础使用帮助手册

前言 MongoDB 是一种流行的 NoSQL 数据库,适合存储大量的非结构化数据。MongoTemplate 是 Spring Data MongoDB 中的一个核心组件,它提供了一组丰富的 API 来与 MongoDB 进行交互。它封装了许多常见的数据库操作,使开发者能够轻松执行 CRUD 操…

图像处理:预览并绘制图像细节

前言 因为最近在搞毕业论文的事情,要做出一下图像细节对比图,所以我这里写了两个脚本,一个用于框选并同时预览图像放大细节,可显示并返回框选图像的坐标,另外一个是输入框选图像的坐标并将放大的细节放置在图像中&…

力扣热题——最长相邻不相等子序列 |

题目要求从字符串数组 words 中选出一个最长的子序列,使得该子序列中相邻字符串对应的 groups 数组中的值不同。通过贪心算法,可以高效地解决该问题。具体步骤为:初始化一个结果列表,遍历 words 数组,检查当前字符串的…

ssti刷刷刷

[NewStarCTF 公开赛赛道]BabySSTI_One 测试发现过滤关键字,但是特殊符号中括号、双引号、点都能用 可以考虑拼接或者编码,这里使用拼接 ?name{{()["__cla"~"ss__"]}}?name{{()["__cla"~"ss__"]["__ba&…

java+selenum专题(一)

环境搭建部署篇-> 1.简介 java版的selenium,介绍一下java selenium自动化测试。大致和pythonselenium自动化测试差不多。基于java和selenium做自动化测试,因此你必须会搭建基本的开发环境,掌握python基本的语法和一个IDE来进行开发&…

[逆向工程]DebugView捕获WPS日志?解析未运行WPS时Shell扩展加载的原因与解决方案(二十五)

[逆向工程]DebugView捕获WPS日志?解析未运行WPS时Shell扩展加载的原因与解决方案(二十五) 引言:一个“幽灵”般的日志问题 你是否在使用 DebugView 排查系统问题时,发现日志中频繁出现 WPS 相关模块(如 k…

ACM模式用Scanner和System.out超时的解决方案和原理

Hi~!这里是奋斗的明志,很荣幸您能阅读我的文章,诚请评论指点,欢迎欢迎 ~~ 🌱🌱个人主页:奋斗的明志 🌱🌱所属专栏:笔试强训 📚本系列文章为个人学…

Java注解详解:从入门到实战应用篇

1. 引言 Java注解(Annotation)是JDK 5.0引入的一种元数据机制,用于为代码提供附加信息。它广泛应用于框架开发、代码生成、编译检查等领域。本文将从基础到实战,全面解析Java注解的核心概念和使用场景。 2. 注解基础概念 2.1 什…

QML 属性动画、行为动画与预定义动画

目录 引言相关阅读本文使用的动画属性工程结构示例解析示例1:属性动画应用示例2:行为动画实现示例3:预定义动画 总结工程下载 引言 QML动画系统为界面元素提供了流畅的过渡效果。本文通过三个示例,结合属性动画(PropertyAnimatio…

window nvidia-smi命令 Failed to initialize NVML: Unknown Error

如果驱动目录下的可以执行,那可能版本原因 "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi"复制"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"替换 C:\Windows\System32\nvidia-smi.exe 或者 把C:\Windows\System3…

自学嵌入式 day19-数据结构 链表

二、线性表的链式存储 1.特点: (1)线性表链式存储结构的特点是一组任意的存储单位存储线性表的数据元素,存储单元可以是连续的,也可以不连续。可以被存储在任意内存未被占用的位置上。 (2)所以…

东芝第3代SiC MOSFET助于降低应用中电源损耗

功率器件是管理和降低各种电子设备电能功耗以及实现碳中和社会的重要元器件。由于与比硅材料相比,碳化硅具有更高的电压和更低的损耗,因此碳化硅(SiC)被广泛视为下一代功率器件的材料。虽然碳化硅功率器件目前主要用于列车逆变器&…

PD 分离推理的加速大招,百度智能云网络基础设施和通信组件的优化实践

为了适应 PD 分离式推理部署架构,百度智能云从物理网络层面的「4us 端到端低时延」HPN 集群建设,到网络流量层面的设备配置和管理,再到通信组件和算子层面的优化,显著提升了上层推理服务的整体性能。 百度智能云在大规模 PD 分离…

官方 Elasticsearch SQL NLPChina Elasticsearch SQL

官方的可以在kibana 控制台上进行查询: POST /_sql { “query”: “SELECT client_ip, status FROM logs-2024-05 WHERE status 500” } NLPChina Elasticsearch SQL就无法以在kibana 控制台上进行查询,但是可以使用postman接口进行查询:

5月16日复盘-目标检测开端

5月16日复盘 一、图像处理之目标检测 1. 目标检测认知 ​ Object Detection,是指在给定的图像或视频中检测出目标物体在图像中的位置和大小,并进行分类或识别等相关任务。 ​ 目标检测将目标的分割和识别合二为一。 ​ What、Where 2. 使用场景 目标检测用于…

mathematics-2024《Graph Convolutional Network for Image Restoration: A Survey》

推荐深蓝学院的《深度神经网络加速:cuDNN 与 TensorRT》,课程面向就业,细致讲解CUDA运算的理论支撑与实践,学完可以系统化掌握CUDA基础编程知识以及TensorRT实战,并且能够利用GPU开发高性能、高并发的软件系统&#xf…

IDEA怎么汉化idea中文改回英文版

第一步:点击左上角的File,然后选择Setting 第二步:Setting页面选择 Appearance & Behavior,然后展开System Settings,然后选择 Language and Region,进行修改 我操作的是2024年的版本 File->Settings -> Ap…