logo资料库

MySQL5.7 OCP进阶 题库中文版包含答案.pdf

第1页 / 共135页
第2页 / 共135页
第3页 / 共135页
第4页 / 共135页
第5页 / 共135页
第6页 / 共135页
第7页 / 共135页
第8页 / 共135页
资料共135页,剩余部分请下载后查看
美河学习在线 www.eimhe.com Question: 1 A MySQL database uses all InnoDB tables and is configured as follows: #MySQL 数据库使用所有 InnoDB 表,配置如下: shell>cat/ etc/ my.cnf [mysqld] log-bin server-id=1 You will be setting up a replication slave by using mysqldump. You will need a consistent backup taken from your running production server. The process should have minimal impact to active database connections. Which two arguments will you pass to mysqldump to achieve this? #您将使用 mysqldump 设置复制从机。您将需要从正在运行的生产服务器上获取一致的备份。 该进程应该对活动数据库连接的影响最小。为了实现这一点,您将把哪两个参数传递给 mysqldump? A. --skip-opt B. --lock-all-tables C. --create-apply-log D. --single-transaction E. --master-data Answer: DE Question: 2 Consider the key buffer in a MySQL server. Which two statements are true about this feature? #考虑 MySQL 服务器中的 key buffer。关于这个特性,哪两种说法是正确的? A. It caches index blocks for MyISAM tables only. #它只缓存 MyISAM 表的索引块。 B. It caches index blocks for all storage engine tables. #它缓存所有存储引擎表的索引块。 C. It is a global buffer. #它是一个全局缓冲区。
美河学习在线 www.eimhe.com It is set on a per-connection basis. D. # D.按每个连接设置。 It caches index blocks for InnoDB tables only. E. # E.它只缓存 InnoDB 表的索引块。 Answer: A,C Question: 3 You have a MySQL replication setup and you intentionally stop the SQL thread on the slave. #您有一个 MySQL 复制设置,并且有意停止从机上的 SQL 线程。 mysql> SHOW SLAVE STATUS\ G Slave_IO_Running: Yes Slave_SQL_Running: No What are two reasons that you may stop the SQL thread on the slave while keeping the I/ O thread running? #在保持 I/O 线程运行的同时,可以停止从机上的 SQL 线程的两个原因是什么? A. to allow the remaining events to be processed on the slave while not receiving new events from the master #允许在从机上处理剩余的事件,而不从主机接收新事件 B. to allow a backup to be created under reduced load #允许在减少负载的情况下创建备份 C. to allow for point-in-time recovery on the slave #允许从机上的时间点恢复 D. to prevent schema changes from propagating to the slave before they are validated # D.防止模式更改在验证之前传播到从属服务器 E. to prevent any transaction experiencing a deadlock Answer:BC Question: 4 Which three statements correctly describe MySQL InnoDB Cluster?
美河学习在线 www.eimhe.com #哪三个语句正确地描述了 MySQL InnoDB 集群? A. The cluster can be operated in multimaster mode with conflict detection for DML statements. # A.集群可以在多主机模式下运行,并对 DML 语句进行冲突检测。 B. All MySQL client programs and connectors can be used for executing queries. #所有 MySQL 客户端程序和连接器都可以用于执行查询。 C. It provides fully synchronous replication between the nodes. #它在节点之间提供完全同步的复制。 D. There is support for automatic failover when one node fails. #当一个节点发生故障时,支持自动故障转移。 E. The data is automatically shared between the nodes. # E.数据在节点之间自动共享。 F. Each query will be executed in parallel across the nodes. # F.每个查询将跨节点并行执行。 Answer: ABD Question: 5 How does the InnoDB storage engine handle deadlocks when they are detected? #当检测到死锁时,InnoDB 存储引擎如何处理它们? A. Both the affected transactions will be rolled back. # A.两个受影响的事务都将回滚。 B. The affected transactions wait for innodb_lock_wait_timeout seconds, and then roll back. # B.受影响的事务等待 innodb_lock_wait_超时秒,然后回滚。 C. One of the affected transactions will be rolled back, the other is allowed to proceed. #一个受影响的事务将回滚,另一个允许继续。 D. The transaction isolation level determines which transaction is rolled back. # D.事务隔离级别决定回滚哪个事务。 E. The innodb_locks_unsafe_for_binlog setting determines which transaction is rolled back. # E.innodb_locks_unsafe_for_binlog 设置确定回滚哪个事务。 Answer: C
美河学习在线 www.eimhe.com Question: 6 Which three allocate memory per thread in MySQL? #在 MySQL 中,哪三个线程分配内存? A. query cache B. thread cache C. read buffer D. internal temporary table E. sort buffer F. InnoDB buffer pool instance Answer: C,D,E Question: 7 You are setting up a new installation of MySQL Server 5.7 (a GA release.) You have used a ZIP or TAR package to ensure that the mysqld binary, along with its support files, such as plug-ins and error messages, now exist on the host. Assume that the default datadir exists on the host. You installed the binary in the default location (the default --basedir value) for your operating system. Which step should you perform before defining your own databases and database tables? #您正在安装 MySQL Server 5.7(GA 释放)的新安装。您已经使用了 ZIP 或 TAR 包,以确保 MySQL 二进制文件及其支持文件(例如插件和错误消息)现在存在于主机上。 假设默认 DATADIR 存在于主机上。您将二进制文件安装在操作系统的默认位置(默认值 --basedir 值)。在定义自己的数据库和数据库表之前,应该执行哪一步? A. Execute a command with a minimal form of: mysqld --initialize # 执行一个最小形式的命令:mysqld--initialize B. Register mysqld as a service that will start automatically on this host machine. # B.将 mysqld 注册为将在此主机上自动启动的服务。 C. Create a configuration file containing default-storage-engine=InnoDB. # C.创建一个包含默认存储引擎 InnoDB 的配置文件。 D. Set an exception in the host machine’s firewall to allow external users to talk to mysqld. # D.在主机防火墙中设置一个例外,允许外部用户与 mysqld 对话。 E. Create additional login accounts (so that everyone does not need to log in as root) and assign them appropriate privileges.
美河学习在线 www.eimhe.com # E.创建额外的登录帐户(这样每个人都不需要以根用户身份登录)并为他们分配适当的权 限。 Answer: A Question: 8 Which two options describe how MySQL Server allocates memory? #哪两个选项描述 MySQL 服务器如何分配内存? A. Each connection may have its own per-thread memory allocations. # A.每个连接可能有自己的每线程内存分配。 B. Thread memory is pre-allocated up to thread_cache_size for performance. # B.为了提高性能,线程内存被预先分配到线程缓存大小。 C. Each thread allocates memory from a global pool. #每个线程从全局池分配内存。 D. Global memory resources are allocated at server startup. # D.全局内存资源在服务器启动时分配。 Answer: A,D Question: 9 Which two statements are true about InnoDB auto-increment locking? #关于 InnoDB 自动增量锁定,哪两种说法是正确的? A. InnoDB never uses table_level locks. # A.InnoDB 从不使用表级锁。 B. InnoDB always protects auto-increment updates with a table-level lock # B.InnoDB 总是使用表级锁保护自动增量更新 C. InnoDB does not use locks to enforce auto-increment uniqueness. # C.InnoDB 不使用锁来强制自动增量唯一性。
美河学习在线 www.eimhe.com D. The auto-increment lock can be a table-level lock. # D.自动增量锁可以是表级锁。 E. Some settings for innodb_autoinc_lock_mode can help reduce locking. # Innodb_autoinc_lock_mode 的一些设置可以帮助减少锁定。 Answer: D,E Question: 10 You have just executed a manual backup by using this command: #您刚刚使用以下命令执行了手动备份: mysqlbackup -u root -p --socket=/tmp/my.sock --backup-dir=/my/backup/ backup The operation completed without error. #操作已完成,没有错误。 What is the state of this backup and operation required before it is ready to be restored? #在准备还原之前,此备份和操作的状态是什么? A. Backup State = Compressed Backup; Operation = copy-back # A.备份状态=压缩备份;操作=复制 B. Backup State = Raw Backup; Operation = apply-log # B.备份状态=原始备份;操作=应用日志 C. Backup State = Prepared Backup; Operation = validate # C.备份状态=准备备份;操作=验证 D. Backup State = Prepared Backup; Operation = apply-log # D.备份状态=准备备份;操作=应用日志 E. Backup State = Raw Backup; Operation = backup-dir-to-image # E.备份状态=原始备份;操作=备份到映像 Answer: B Question: 11 Host slave1 has ip address 192.0.2.10. Host slave2 has ip address 203.0.113.50 Examine these commands:
美河学习在线 www.eimhe.com Why did this error occur? #为什么会发生这个错误? A. The host on the command line is not defined in the login path. # A.登录路径中未定义命令行上的主机。 B. The mysqld instance has not been restarted after creating the login path. # B.创建登录路径后,mysqld 实例尚未重新启动。 C. There is no password defined in the login path. # C.登录路径中没有定义密码。 D. The DNS is not configured correctly for slave1 host. # D.slave1 主机的 DNS 配置不正确。 E. The mylogin.cnf file is not readable. # E.mylogin.cnf 文件不可读。 Answer: C Question: 12 You have installed MySQL Server for the first time on your system. However, the data directory along with the tables in the mysql system database are missing. Which step do you perform to create the contents of the data directory? #您首次在系统上安装了 MySQL 服务器。然而,数据 mysql 系统数据库中缺少目录和表。您 执行哪一步来创建数据目录的内容? A. Run the create_system_tables.sql file # A.运行 create_system_tables.sql 文件 B. Run the mysql_unpack.sql file
美河学习在线 www.eimhe.com # B.运行 mysql_unpack.sql 文件 C. Invoke mysqld with the --initialize option. D. Invoke mysql with the --initialize option. Answer: C Question: 13 A single InnoDB table has been dropped by accident. You are unable to use an additional intermediate MySQL instance to restore the table. Which two backup methods can be used to restore the single table without stopping the MySQL instance? #一个 InnoDB 表被意外丢弃。无法使用其他中间 MySQL 实例还原表。哪两种备份方法可以 在不停止 MySQL 实例的情况下恢复单个表? A. a backup created with mysqldump --all-databases # A.使用 mysqldump 创建的备份--所有数据库 B. a backup created using FLUSH TABLES … FOR EXPORT # B.使用刷新表创建的备份…用于导出 C. an up-to-date replication slave # C.最新的复制从机 D. a file system-level snapshot # D.文件系统级快照 E. a file system copy created while MySQL was shut down. #在 MySQL 关闭时创建的文件系统副本。 Answer: A,B Question: 14 You created a backup of the world database with this command: #使用以下命令创建了世界数据库的备份: shell> mysqldump --opt world > dump.sql Which two will import the data from dump.sql?
分享到:
收藏