2022年MySQL8 OCP最新题库整理,传授有缘人

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介: 2022年MySQL8 OCP最新题库整理,传授有缘人

🚀 1.用户连接


Choose the best answer.

Examine these statements and output:

mysql> GRANT PROXY ON accounting@localhost TO ’ ‘@’%’ ;

mysql> SELECT USER(), CURRENT_USER(), @@proxy_user;


93cd016851c4460498a6199f6a327004.png

Which statement is true?

A) The user failed to define a username and the connecting username defaulted to ’ ‘@’%‘.

B) The user is authorized as the rsmith@localhost user.

C) The user is authenticated as the anonymous proxy user ’ ‘@’%’.

D) The user is logged in with --user=accounting as an option.

E) The user is authorized as the accounting@localhost user.


Answer:E

分析:proxy 户创建构成

– create proxy account

CREATE USER ‘employee_proxy’@‘%’ identified by ‘123456’;

– create proxied account and grant its privileges;

CREATE USER ‘employee’@‘localhost’ identified by ‘123456’;

GRANTALL ON . TO ‘employee’@‘localhost’;

– grant to proxy account the

GRANT PROXY ON ‘employee’@‘localhost’ TO ‘employee_proxy’@‘%’;

CURRENT_USER()的权限是真正当前作用的用户权限


🚀 2.索引


Choose the best answer.

Examine this statement, which executes successfully


0e5e31f3c36d457287862d6b1be4c1ee.png



You want to improve the performance of this query:

SELECT Name

FROM world.city

WHERE Population BETWEEN 1000000AND 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 FULLTEXT INDEX (Population) ;

E) ALTER TABLE world.city ADD SPATIAL INDEX (Population) ;

F) ALTER TABLE world.city ADD INDEX (Population) ;


Answer:F


🚀 3.参数文件


Choose four.

Anewly deployed replication master database has a 10/90 read to write ratio.

The complete dataset is currently 28G but will never fluctuate beyond ±10%.

The database storage system consists of two locally attached PCI- E Enterprise grade disks

(mounted as /data1 and /data2)

The server is dedicated to this MySQL Instance.

System memory capacity is 64G.

The my.cnf file contents are displayed here:

[mysqld]

datadir=/data1/

innodb_buffer_pool_size=28G

innodb_log_file_size=150M

Which four changes provide the most performance improvement, without sacrificing data

integrity?

A) innodb-doublewrite=off

B) innodb_log_group_home_dir=/data2/

C) innodb_log_file_size=1G

D) innodb_undo_directory=/dev/shm

E) log-bin=/data2/

F) innodb_flush_log_at_trx_commit=0

G) sync_binlog=0

H) innodb_buffer_pool_size=32G

I) disable-log-bin


Answer: B C E H

分析:不牺牲数据完整性的情况下提供了最大的性能改进


🚀 4.日志文件


Choose the best answer.

You want to log only the changes made to the database objects and data on the MySQL system.

Which log will do this by default?

A) slow query log

B) binary log

C) error log

D) general query log

E) audit log


Answser:B

具体参考以下csdn博客

https://jeames.blog.csdn.net/article/details/122116687


🚀 5.网络


Choose two.

Identify two ways to significantly improve data security.

A) Configure mysqld to run as the system admin account, such as root.

B) Use a private network behind a firewall.

C) Configure mysqld to use only networked disks.

D) Configure MySQL to have only one administrative account.

E) Configure mysqld to use only local disks or attached disks and to have its own account in the

host system.


Answer:B E

分析:网络隔离 最好 , D 的问题是 administrator 这个权限太大了,应该有多个

administrative account,每个只有部分权限。


🚀 6.备份恢复


Choose two.

Which two statements are true about MySQL Enterprise Backup?

A) It creates logical backups.

B) It supports backing up only table structures.

C) It can perform hot or warm backups.

D) It supports backup of a remote MySQL system.

E) It supports restoring to a remote MySQL system.

F) It supports the creation of incremental backups.


Answer:C F

具体参考以下csdn博客

https://jeames.blog.csdn.net/article/details/124441792


🚀 7.数据库升级


Choose the best answer.

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


e3b9f86d769045529a67f7afce58fed2.png


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:C

B 这些表都是 MyISAM 的表,但 myisamchk --update-state 并没有指定修复,

要指定–force进行修复。

E mysqlcheck --check-upgrade 也没有指定修复


Choose the best answer.

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 check-for-server-upgrade

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.

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
3月前
|
SQL 算法 关系型数据库
(二十)MySQL特性篇:2022年的我们,必须要懂的那些数据库新技术!
 MySQL数据库从1995年诞生至今,已经过去了二十多个年头了,到2022.04.26日为止,MySQL8.0.29正式发行了GA版本,在此之前版本也发生了多次迭代,发行了大大小小N多个版本,其中每个版本中都有各自的新特性,所有版本的特性加起来,用一本书的篇幅也无法完全阐述清楚,因此本章主要会挑重点特性来讲,具体各版本的特性可参考MySQL官网的开发手册。
148 1
|
SQL 运维 Oracle
MySQL 8.0 OCP(1Z0-908)中文题库解析
使用 MySQL Enterprise Monitor的无代理安装监视 MySQL服务器。
556 0
|
关系型数据库 MySQL
第一个获得MySQL 8 OCP的?
2020年7月7日考了MySQL 8 OCP,从百度搜索结果来看,目前中国只有我一个人取得了MySQL 8 OCP,肯定别人也有人考过了MySQL 8 OCP,不过人家比较低调,没有写博客罢了。从 MySQL 3 开始使用 MySQL,MySQL 5.6和5.7 OCP,现在是第三个 OCP 了。
171 0
|
存储 SQL Oracle
让ChatGPT做一下MySQL 8.0 OCP(1Z0-908)的真题,我松了一口气
MySQL OCP分成中文和英文两种,Oracle OCP只有英文考试,这里我们用MySQL 8.0 OCP(1Z0-908)的中文真题测试一下ChatGPT,看看ChatGPT能否获得MySQL OCP的认证,用这种方法判断ChatGPT会不会代替我们人类DBA的工作。
287 0
|
SQL 运维 Oracle
MySQL 8.0 OCP(1Z0-908)中文题库解析
作者介绍:姚远,Oracle ACE(Oracle和MySQL数据库方向),华为云MVP,《MySQL 8.0运维与优化》的作者。
845 0
|
运维 Oracle 安全
在家参加OCP考试(MySQL OCP和Oracle OCP)
考试前 考试前需要了解信息如下
798 0
|
SQL 运维 Oracle
MySQL 8.0 OCP 1Z0-908认证考试题库(7-20)
Examine the command, which execute successfully
811 0
|
JavaScript Oracle 关系型数据库
参加Oracle OCP和MySQL OCP考试的学员怎样在VUE预约考试
参加Oracle OCP和MySQL OCP考试的学员都需要在VUE预约考试,很多新手不知道如何在VUE预约考试,这里姚远老师一步一步地教大家如何预约VUE考试。
|
运维 Oracle JavaScript
Oracle OCP和MySQL OCP认证考试内容有哪些?
Oracle和MySQL数据库是世界上最流行的两种数据库,根据数据库权威网站db-engines的排名,这两种数据库是唯一超过1000分的两种数据库。
668 0