签到成功

知道了

CNDBA社区CNDBA社区

Mysql OCP 54题

2021-12-13 21:38 1575 0 原创 mysql
作者: hbhe0316

A MySQL replication slave is set up as follows:
. Uses all InnoDB tables
. Receives ROW-based binary logs
. Has the read-only optionhttp://www.cndba.cn/hbhe0316/article/22794http://www.cndba.cn/hbhe0316/article/22794

The replication slave has been found in an error state.
You check the MySQL error log file and find these entries:
2013-08-27 13:55:44 9056 [EROR] Slave SQL: Cloud not execute Write rows event on table test.t1; Duplicate entry ‘3’ for key ‘PRIMARY’, Error_code: 1062; handler error
HA_ERR_FOUND_DUPP_KEY; the event’s master log 56_master-bin.000003, end_log_pos 653,
Error_code: 1062
2013-08-27 13:55:44 9056 [Warning] Slave: Duplicate entry ‘3’ for key ‘PRIMARY’ Error code:
1062
2013-08-27 13:55:44 9056 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with ‘SLAVE START’. We stopped at log ‘56_master-bin.000003’ position 496http://www.cndba.cn/hbhe0316/article/22794

What are two possible causes for this error to occur?
A. The applications have the SUPER privilege, which allows them to update rows.
B. The root user on the slave has executed FLUSH LOGS, causing the relay-log to doublewrite.
C. For tables with UNIQUE keys, statement-based replication must be used to maintain integrity.
D. The slave was created with mysqldump –u root -p —skip-lock-tables -all-databases >/data/data.sql
E. The slave user does not have INSERT, UPDATE, or DELETE permission and cannot execute the Write_rows function.
Answer: AD
某从库的配置如下:
全部是InnoDB表
接收ROW格式的binlog
配置有read-onlyhttp://www.cndba.cn/hbhe0316/article/22794

http://www.cndba.cn/hbhe0316/article/22794
http://www.cndba.cn/hbhe0316/article/22794
http://www.cndba.cn/hbhe0316/article/22794http://www.cndba.cn/hbhe0316/article/22794

报错信息如下:
下面哪两种可能的情况会造成此问题?
A.应用程序具有SUPER权限
B.从库上执行了FLUSH LOGS命令
C.对于包含UNIQUE约束的表,必须使用基于statement格式binlog的复制才能保证一致性
D.从库是使用如下mysqldump命令创建的:mysqldump –u root -p —skip-lock-tables -all-databases >/data/data.sql
E.复制用户没有足够的权限执行INSERT、UPDATE或者DELETE语句

http://www.cndba.cn/hbhe0316/article/22794
http://www.cndba.cn/hbhe0316/article/22794

版权声明:本文为博主原创文章,未经博主允许不得转载。

MYSQL

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:2656422次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ