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

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 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.

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
4月前
|
存储 关系型数据库 MySQL
MySQL最全整理(面试题+笔记+导图),面试大厂不再被MySql难倒
作为一名编程人员,对MySQL一定不会陌生,尤其是互联网行业,对MySQL的使用是比较多的。对于求职者来说,MySQL又是面试中一定会问到的重点,很多人拥有大厂梦,却因为MySQL败下阵来。实际上,MySQL并不难,今天这份最全的MySQL总结,助你向大厂“开炮”,面试不再被MySQL难倒。
|
10月前
|
存储 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的工作。
217 0
|
存储 关系型数据库 MySQL
MySQL复习资料——用于突击考试总结
MySQL复习资料——用于突击考试总结
138 0
|
关系型数据库 MySQL
【面试必刷】Mysql编程题:第三期
【面试必刷】Mysql编程题:第三期
【面试必刷】Mysql编程题:第三期
|
关系型数据库 MySQL 数据库管理
【面试必刷】Mysql编程题:第五期
【面试必刷】Mysql编程题:第五期
【面试必刷】Mysql编程题:第五期
|
关系型数据库 MySQL
【面试必刷】Mysql编程题:第四期
【面试必刷】Mysql编程题:第四期
【面试必刷】Mysql编程题:第四期
|
SQL 关系型数据库 MySQL
【面试必刷】Mysql编程题:第六期
【面试必刷】Mysql编程题:第六期
【面试必刷】Mysql编程题:第六期
|
关系型数据库 MySQL
【面试必刷】Mysql编程题:第七期
【面试必刷】Mysql编程题:第七期
【面试必刷】Mysql编程题:第七期
|
关系型数据库 MySQL
【面试必刷】Mysql编程题:第二期
【面试必刷】Mysql编程题:第二期
【面试必刷】Mysql编程题:第二期
|
关系型数据库 MySQL 索引
【面试必刷】Mysql编程题:第一期
【面试必刷】Mysql编程题:第一期
【面试必刷】Mysql编程题:第一期