关闭

ERROR 1062 (23000): Duplicate entry '5' for key 'PRIMARY'

现象: MySQL 主从切换后,新的master上写入数据报主键冲突.错误如下: ERROR 1062 (23000): Duplicate entry '5' for key 'PRIMARY' 原因: 主从切换后只有一张表有问题,其它的表都正常。 由于使用了replace into 方式插入导致新插入数据,导致slave上表的AUTO_INCREMENT小于Master。 ...
阅读(59) 评论(0)

Coordinator stopped because there were error(s) in the worker(s).

MySQL5.7  多源复制其中的一个chaannel 报错如下: mysql> select * from performance_schema.replication_applier_status_by_worker where  LAST_ERROR_NUMBER>0\G *************************** 1. row *******************...
阅读(64) 评论(0)

Can't execute the query because you have a conflicting read lock

mysql> create table t (id int(10) ); ERROR 1223 (HY000): Can't execute the query because you have a conflicting read lock mysql> select id,user,host,command,time,state from information_sch...
阅读(58) 评论(0)

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

测试环境应用连不上MySQL,怀疑数据库有问题。 错误信息如下: SEVERE: Unable to create initial connections of pool. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent suc...
阅读(109) 评论(0)

failed executing transaction 'ANONYMOUS' at master

测试MySQL5.6 到MySQL5.7跨版本的多源复制功能,MySQL5.6中(Master)更新mysql.user表时,遇到如下错误:Master1: mysql> delete from mysql.user where user=’master1’; Query OK, 1 row affected (0.00 sec)Slave: mysql>show slave status\...
阅读(229) 评论(0)

mysqld_safe Can't log to error log and syslog at the same time.

由于安全审计需要,要将mysql的error log 记录到syslog中。mysqld_safe –verbose –help|grep syslog –syslog Log messages to syslog with ‘logger’ –skip-syslog Log messages to error l...
阅读(141) 评论(0)

Logstash API Monitor

Logstash 5.0 开始,提供了输出自身进程的指标和状态监控的 API。官方文档: https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html#monitoringNode Info API https://www.elastic.co/guide/en/logstash/current/node-in...
阅读(80) 评论(0)

OneProxy6.1.3 读写分离配置

oneproxy基于一主一从的MySQL 读写分离配置步骤环境准备: a. 搭建好MySQL 主从复制环境 b. 下载并安装好oneproxy,并能正常启动oneproxy读写分离配置 1.MySQL Master上建立三个用户 a)metadb用户,创建oneproxy schema的库和表。 create database oneproxy; GRANT SELECT, INSERT...
阅读(124) 评论(0)

OneProxy高可用

进程级高可用 /oneproxy/conf/proxy.conf 中增加如下配置 [oneproxy] keepalive = 1ps -ef|grep oneproxy root 25927 1 0 13:59 ? 00:00:00 /opt/oneproxy/bin/oneproxy –defaults-file=/oneproxy/conf/p...
阅读(59) 评论(0)

stop slave IO_THREAD | SQL_THREAD 不生效

mysql> select @@version; +————+ | @@version | +————+ | 5.6.24-log | +————+ 1 row in set (0.00 sec)模拟slave故障oneproxy的读写分离转发功能时,发现无法stop slave sql_thread;或stop slave io_thread;可以stop slave;命令可以执行成...
阅读(83) 评论(0)

MySQL不能启动 FTS optimize thread exiting

初始化一套MySQL但拉起不来,日志如下: [Note] InnoDB: The InnoDB memory heap is disabled [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins [Note] InnoDB: Memory barrier is not used [Note] InnoDB: Comp...
阅读(166) 评论(0)

not authorized on local to execute command

线上MongoDB 监控项不能出图,检查后发现是权限有问题。SECONDARY> db.printReplicationInfo() 2017-08-21T14:46:55.587+0800 E QUERY [thread1] Error: listCollections failed: { “ok” : 0, “errmsg” : “not author...
阅读(133) 评论(0)

Failed to execute mysql_file_stat on file

Version: MySQL 5.6.19 现象:mysql错误日志告警: [Note] Failed to execute mysql_file_stat on file ‘./mysql-bin.024316’原因:purge binlog时,由于有些binlog 文件不在mysql-bin.index 中导致。起因 大数据的一台MySQL磁盘空间告警,经检查发现是binlog太多导致。...
阅读(105) 评论(0)

5.6.24-72.2-log Percona Server 主从延迟

问题描述: 一套监控的zabbix从库总是出现瞬间短暂的秒级延迟。 主从库版本都是Percona Server 5.6.24 ,软硬件配置基本相同。 从监控上看,硬件资源(cpu,内存,IO,网络)都没压力,而且有富余。 MySQL的监控上看,也没什么压力。就是短暂的主从延迟,虽然不会丢业务有影响,但看着不舒服。问题排查: mysql> show variables where vari...
阅读(78) 评论(0)

Read semi-sync reply magic number error

问题描述 MySQL 5.7.19 开启半同步后, 主库,从库并无压力的情况下,复制异常慢. 连简单的create table 命令都要等上一会。但关闭半同步后,复制恢复正常。Master日志中有如下错误: 2017-08-10T08:52:06.526471Z 0 [ERROR] Read semi-sync reply magic number error 2017-08-10T08:5...
阅读(125) 评论(0)
494条 共33页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:1757316次
    • 积分:21798
    • 等级:
    • 排名:第353名
    • 原创:482篇
    • 转载:6篇
    • 译文:6篇
    • 评论:99条