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.pswp.cn/diannao/83926.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/83926.shtml
英文地址,請注明出處:http://en.pswp.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寄存器中開啟總…