MySQL 8.0 OCP 1Z0-908 101-110题

Q101.which two queries are examples of successful SQL injection attacks?

A.SELECT id, name FROM backup_before WHERE name=‘; DROP TABLE injection; --’;
B. SELECT id, name FROM user WHERE id=23 oR id=32 OR 1=1;
C. SELECT id, name FROM user WHERE user.id= (SELECT members.id FROM members);
D.SELECT email, passwd FROM members
WHERE email= ‘INSERT INTO members (‘email’, ‘passwd’) VALUES
(‘bob@example.com’, ‘secret’);–’;
E. SELECT user,passwd FROM members WHERE user=‘?’;INSERT INTO members (‘user’,"passwd’) VALUES ("bob@example.com’, ‘secret’);–';
F. SELECT id, name FROM user WHERE id=23 oR id=32 AND 1=1;
Answer:BE

SQL注入我不懂
参考:https://blog.csdn.net/DBA_ChenJR/article/details/147816607

Q102.You must run multiple instances of MySQL Server on a single host.Which three methods are supported?
A)Use system tools to lock each instance to its own CPU.
B)Run MySQL Server docker containers.
C)Use systemd with different settings for each instance.
D)Start mysqld or mysqld safe using different option files for each instance.
E)Run mysqld with --datadir defined for each instance.
F)Use resource groups to lock different instances on separate CPUs.
Answer:CDE

Q103.Which statement enables all roles granted to all users automatically?
A) SET ROLE ALL;
B) SET DEFAULT ROLE ALL TO ‘*’@‘1’%';
C) SET PERSIST activate_all_roles_on_login=ON;
D) SET PERSIET mandatory_roles=ALL;
Answer:C

将 activate_all_roles_on_login 系统变量默认值为OFF,若设置为ON,服务器在登录时将激活授予每个账户的角色。

Q104.Which two situations will cause the binary log to rotate?
A)FLUSH HOSTS executed
B)max_binlog_size exceeded
C)max_binlog_cache_size exceeded
D)SET sql_log_bin=1 executed
E)SET sync_binlog=1 executed
F)FLUSH LOGS executed
Answer:BF

选项A:FLUSH HOST语句用于清除主机缓存表,以便重新加载主机名和IP地址的映射。
选项B:max_binlog_size表示binlog的最大文件大小,日志写入超过这个参数的设置的大小后,会关闭这个文件,然后重新创建一个新的binlog写入,进行轮转
选项C:max_binlog_cache_size 是一个 MySQL 系统变量,用于限制二进制日志(binlog)缓存的大小。,这个超出了会报错
选项D:sql_log_bin参数控制在当前会话中是否写binlog
选项E:sync_binlog控制binlog刷写到磁盘的方式,比如sync_binlog=0,不将日志写入磁盘,根据操作系统走,sync_binlog=1,每次提交都刷写到磁盘,sync_binlog=N,N次提交刷写到磁盘
F:FLUSH LOGS会新建一个日志,进行轮转

Q105.Examine this statement, which executes successfully:
CREATE TABLE world.city (
ID int NOT NULL AUTO_INCREMENT,
Name char (35) NOT NULL DEFAULT ‘’,
CountryCode char (3) NOT NULL DEFAULT ‘’,
District char (20) NOT NULL DEFAULT ‘’,
Population int NOT NULL DEFAULT ‘0’,
PRIMARY KEY (ID),
KEY (CountryCode (CountryCode)) ENGINE InnoDB;

SELECT Name
FROM world. city
WHERE Population BETWEEN 1000000 AND 2000000;
Which change enables the query to succeed while accessing fewer rows?
A)ALTER TABLE world.city ADD INDEX (Name) ;
B)ALTER TABLE world.city ADD SPATIAL INDEX (Name);
C)ALTER TABLE world.city ADD FULLTEXT INDEX (Name);
D)ALTER TABLE world.city ADD SPATIAL INDEX (Population);
E)ALTER TABLE world.city ADD INDEX (Population);
F)ALTER TABLE world.city ADD FULLTEXT INDEX (Population);
Answer:E

选项ABC,跟本次查询没有关系,并且population为int类型,所以就普通的二级索引就可以,没必要使用空间索引和全文索引

Q106.Examine this configuration:
You have a corporate private network, which uses its own Certificate Authority (CA) using an industry standard
2048-bit RSA key length.
 All MySQL Server and client certificates are signed using the central corporate CA.
 All clients are known, controlled,and exist only on the private LAN.
 The private network uses its own private authoritative DNS.
 The private network also uses other nominal enterprise services.
 An end-to-end encrypted connection for a MySQL client to MySQL server has been established on this LAN.
How does the MySQL Servers’ self signed certificate compare to one that would be signed by a known public,third party trusted Certificate Authority?
A)The self-signed certificate is equally secure and equally trusted.
B)The self-signed certificate is more secure and less trusted.
C)The self-signed certificate is less secure and equally trusted.
D)The self-signed certificate is equally secure and less trusted.
E)The self -signed certificate is more secure and equally trusted.
F)The self-signed certificate is less secure and less trusted
Answer:F

自签证书的安全性和信任度较低

Q107.Which two are valid uses for binary logs on a MySQL instance?
A)logging the duration and locks for all queries //记录日志期间不产生锁
B)replication
C)audit of all queries
D)point-in-time recovery
E)recording the order in which queries are issued
Answer:BD

选项A:不记录SELECT和锁信息
选项B:复制期间是需要binlog的
选项C:查询的审计记录在审计日志,跟binlog没关系
选项D:基于时间点的恢复,是需要binlog支撑的
选项E:参考选项A

Q108.Which two are characteristics of snapshot based backups?
A)There is no need for InnoDB tables to perform its own recovery when restoring from the snapshot
backup.
B)Snapshot backups can be used only in virtual machines.
C)Snapshot based backups greatly reduce time during which the database and applications are unavailable.
D)The frozen file system can be cloned to another virtual machine immediately into active service.
E)A separate physical copy must be made before releasing the snapshot backup
Answer:AC

选项A:快照恢复完成后,启动时会自己进行Crash Recovery
选项C:快照备份会减少数据库和应用的不可用时间

Q109.Examine this output:
在这里插入图片描述

You plan to add this parameter to the configuration:
innodb_ directories=’ /innodb_ extras ‘
Which statement is true?
A)It defines all innodb tablespace options relative to a starting parent directory.
B)It adds more temporary workspace in addition to the innodb_ tmpdir location.
c)It moves all innodb tablespaces to the 1 innodb_ extras directory to enable a new
innodb_ data_ home_ dir to be defined.
D)It is not necessary because innodb data_ home_ dir is already defined.
E)It allows scanning of other locations to discover more innodb tablespaces .
Answer:E

innoDB_directories变量,它定义了在启动时扫描以查找表空间文件的目录。innodb_directories默认设置为NULL,但当innodb构建启动时要扫描的目录列表时,innodb_data_home_dir、innodb_undo_directory和datadir定义的目录总是附加到innodb_directories参数值之后。无论是否显式指定了innodb_directories设置,都会附加这些目录。
使用绝对路径定义的表空间文件或位于附加到innodb_directories设置的目录之外的表空间应添加到innodd_directories设置中。参考:
https://dev.mysql.com/doc/refman/8.0/en/innodb-moving-data-files-offline.html
https://blog.csdn.net/qq_29519041/article/details/139078303

Q110.Examine this command, which executes successfully:
mysqldump --user=root --password > full_ backup.sql
Which two databases will be excluded from this dump?
A)world
B)employee
C)information schema
D)mysql
E)sys
Answer:CE
在这里插入图片描述

参考:https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

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

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

相关文章

Vue ElementUI原生upload修改字体大小和区域宽度

Vue ElementUI原生upload修改字体大小和区域宽度 修改后 代码 新增的修改样式代码 .upload-demo /deep/ .el-upload-dragger{width: 700px;height: 300px; }原有拖拽组件代码 <!-- 拖拽上传组件 --><el-uploadclass"upload-demo"dragaction"":m…

React和Vue在前端开发中, 通常选择哪一个

React和Vue的选择需结合具体需求&#xff1a; 选React的场景 大型企业级应用&#xff0c;需处理复杂状态&#xff08;如电商、社交平台&#xff09;团队熟悉JavaScript&#xff0c;已有React技术栈积累需要高度灵活的架构&#xff08;React仅专注视图层&#xff0c;可自由搭配…

Python爬虫实战:研究源码还原技术,实现逆向解密

1. 引言 在网络爬虫技术实际应用中,目标网站常采用各种加密手段保护数据传输和业务逻辑。传统逆向解密方法依赖人工分析和调试,效率低下且易出错。随着 Web 应用复杂度提升,特别是 JavaScript 混淆技术广泛应用,传统方法面临更大挑战。 本文提出基于源码还原的逆向解密方法…

什么是alpaca 或 sharegpt 格式的数据集?

环境&#xff1a; LLaMA-Factory 问题描述&#xff1a; alpaca 或 sharegpt 格式的数据集&#xff1f; 解决方案&#xff1a; “Alpaca”和“ShareGPT”格式的数据集&#xff0c;是近年来在开源大语言模型微调和对话数据构建领域比较流行的两种格式。它们主要用于训练和微调…

OpenCV CUDA模块中矩阵操作------矩阵元素求和

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 在OpenCV的CUDA模块中&#xff0c;矩阵元素求和类函数主要用于计算矩阵元素的总和、绝对值之和以及平方和。这些操作对于图像处理中的特征提取、…

给视频加一个动画。

为什么要给视频加一个动画&#xff1f; 很完整的视频也就是从短动画开始的。遮盖住LOG用。 C:\Users\Sam\Desktop\desktop\startup\workpython\ocr Lottie.py import subprocessdef run_ffmpeg(cmd):print("Running:", " ".join(cmd))subprocess.run(cm…

15:00开始面试,15:06就出来了,问的问题有点变态。。。

从小厂出来&#xff0c;没想到在另一家公司又寄了。 到这家公司开始上班&#xff0c;加班是每天必不可少的&#xff0c;看在钱给的比较多的份上&#xff0c;就不太计较了。没想到4月一纸通知&#xff0c;所有人不准加班&#xff0c;加班费不仅没有了&#xff0c;薪资还要降40%…

使用命令行拉取 Git 仓库

1. 克隆远程仓库&#xff08;首次获取&#xff09; # 克隆仓库到当前目录&#xff08;默认使用 HTTPS 协议&#xff09; git clone https://github.com/用户名/仓库名.git# 克隆仓库到指定目录 git clone https://github.com/用户名/仓库名.git 自定义目录名# 使用 SSH 协议克隆…

如何禁止chrome自动更新

百度了一下 下面这个方法实测有效 目录 1、WINR 输入 services.msc 2、在Services弹窗中找到下面两个service并disable 3、验证是否禁止更新成功&#xff1a; 1、WINR 输入 services.msc 2、在Services弹窗中找到下面两个service并disable GoogleUpdater InternalService…

数据库事务以及JDBC实现事务

一、数据库事务 数据库事务&#xff08;Database Transaction&#xff09;是数据库管理系统中的一个核心概念&#xff0c;它代表一组操作的集合&#xff0c;这些操作要么全部执行成功&#xff0c;要么全部不执行&#xff0c;即操作数据的最小执行单元&#xff0c;保证数据库的…

【vue】【环境配置】项目无法npm run serve,显示node版本过低

解决方案&#xff1a;安装高版本node&#xff0c;并且启用高版本node 步骤&#xff1a; 1、查看当前版本 node -v2、配置nvm下载镜像源 1&#xff09;查看配置文件位置 npm root2&#xff09;找到settings.txt文件 修改镜像源为&#xff1a; node_mirror: https://npmmirro…

WPF之INotifyPropertyChanged实现

文章目录 引言INotifyPropertyChanged接口基础接口定义工作原理 基本实现方式标准实现示例CallerMemberName特性 高级实现技术基类实现通知多个属性变化使用PropertyChanging事件 MVVM框架中的实现MVVM模式简介MVVM框架中的实现Prism框架MVVM Light框架自定义MVVM基类 性能优化…

【MCP教程系列】SpringBoot 搭建基于 Spring AI 的 SSE 模式 MCP 服务

原文地址&#xff1a;https://developer.aliyun.com/article/1662946 在当今快速发展的AI技术背景下&#xff0c;如何高效地集成模型能力成为开发者关注的重点。本文将手把手教你如何基于 Spring AI 搭建支持 SSE&#xff08;Server-Sent Events&#xff09;模式的 MCP 服务 相…

springboot集成langchain4j实现票务助手实战

前言 看此篇的前置知识为langchain4j整合springboot&#xff0c;以及springboot集成langchain4j记忆对话。 Function-Calls介绍 langchain4j 中的 Function Calls&#xff08;函数调用&#xff09;是一种让大语言模型&#xff08;LLM&#xff09;与外部工具&#xff08;如 A…

MySQL-数据库分布式XA事务

准备 innodb存储引擎开启支持分布式事务 set global innodb_support_axonMySQL数据库XA事务的SQL语法如下&#xff1a; XA {START| BEGIN} xid {JOIN | RESUME} XA END xid {SUSPEND [ FOR MIGRATE]} XA PREPARE xid XA COMMIT xid [ONE PHASE] XA ROLLBACK xid XA RECOVER 完…

SAP 运维-冷门问题解决办法

1.SAP Fiori帮助菜单链接如何配置&#xff1f; 答&#xff1a; 执行事务代码HELP_CONFIG&#xff0c;选择对应的Fiori部署模式&#xff0c;配置帮助菜单下的URL链接。 检查配置的帮助菜单&#xff0c;执行事务代码/N//UI2/FLP_CUS_CONF 或者SR13进行查看配置状态与修改。

新型智慧园区技术架构深度解析:数字孪生与零碳科技的融合实践

&#x1f3ed;在杭州亚运村零碳园区&#xff0c;光伏板与氢燃料大巴构成的能源网络&#xff0c;正通过数字孪生技术实现智能调度。这不仅是格力电器与龙源电力在新能源领域的创新实践&#xff0c;更是智慧园区4.0时代的标杆案例。当AI算法开始接管能源调度&#xff0c;当BIM建模…

Java转Go日记(三十六):简单的分布式

1.1.1. 简单的分布式server 目前分布式系统已经很流行了&#xff0c;一些开源框架也被广泛应用&#xff0c;如dubbo、Motan等。对于一个分布式服务&#xff0c;最基本的一项功能就是服务的注册和发现&#xff0c;而利用zk的EPHEMERAL节点则可以很方便的实现该功能。EPHEMERAL节…

机器学习笔记——特征工程

大家好&#xff0c;这里是好评笔记&#xff0c;公主号&#xff1a;Goodnote&#xff0c;专栏文章私信限时Free。本笔记介绍机器学习中常见的特征工程方法、正则化方法和简要介绍强化学习。 文章目录 特征工程&#xff08;Fzeature Engineering&#xff09;1. 特征提取&#xff…

在 Ubuntu 20.04.6 LTS 中将 SCons 从 3.1.2 升级到 4.9.1

在 Ubuntu 20.04.6 LTS 中将 SCons 从 3.1.2 升级到 4.9.1&#xff0c;可以通过以下步骤完成&#xff1a; 方法 1&#xff1a;使用 pip 安装&#xff08;推荐&#xff09; 步骤 1&#xff1a;卸载旧版本 SCons # 如果通过 apt 安装的旧版本&#xff0c;先卸载 sudo apt remov…