我在从属数据库上的mysqld.log中遇到错误。突然停止工作了..。
180917 18:01:44 mysqld_safe Starting mysqld daemon with databases from /var/www/ncc-web/var/mysql
180917 18:01:44 InnoDB: The InnoDB memory heap is disabled
180917 18:01:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180917 18:01:44 InnoDB: Compressed tables use zlib 1.2.7
180917 18:01:44 InnoDB: Initializing buffer pool, size = 2.0G
180917 18:01:44 InnoDB: Completed initialization of buffer pool
180917 18:01:44 InnoDB: highest supported file format is Barracuda.
180917 18:01:44 InnoDB: Waiting for the background threads to start
180917 18:01:45 InnoDB: 1.1.8 started; log sequence number 106350794935
180917 18:01:45 [Warning] Failed to setup SSL
180917 18:01:45 [Warning] SSL error: Failed to set ciphers to use
180917 18:01:45 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
180917 18:01:45 [Note] - '0.0.0.0' resolves to '0.0.0.0';
180917 18:01:45 [Note] Server socket created on IP: '0.0.0.0'.
180917 18:01:45 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000214' at position 11716747, relay log '/<path>/var/mysql/mysql-relay-bin.000681' position: 11716893
180917 18:01:45 [ERROR] Slave SQL: Could not execute Update_rows event on table performance_schema.setup_instruments; Can't find record in 'setup_instruments', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log mysql-bin.000214, end_log_pos 11717881, Error_code: 1032
180917 18:01:45 [Warning] Slave: Can't find record in 'setup_instruments' Error_code: 1032
180917 18:01:45 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000214' position 11716747
180917 18:01:45 [Note] Event Scheduler: Loaded 0 events
180917 18:01:45 [Note] /<path>/parts/mysql/bin/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/<path>/var/mysql/mysql.sock' port: 3306 Source distribution
180917 18:01:45 [ERROR] Slave I/O: error connecting to master 'replication@xx.xx.xx.xx:3306' - retry-time: 60 retries: 86400, Error_code: 1129
我不知道该怎么修。我继承了这个,所以我从来没有设置过它。
解决方案:
除了以下建议,以克服有关更新行的错误:
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
Stop slave;
start slave;
我发现从I/O错误Error_code: 1129与最大连接数有关:
我尝试从从服务器连接到主服务器:
[$ bin/mysql -h xx.xx -u ERROR 1129 (HY000):主机‘xx.xx’由于许多连接错误而被阻塞;请使用'mysqladmin flush--u‘解除阻塞
我在主服务器上执行了mysqladmin flush-hosts,一切都修复好了!
发布于 2018-09-18 03:26:48
Slave正在尝试删除不存在的记录,因此正在进入错误状态。
如果是单个错误,您可以跳过二进制日志中的行以继续执行,而不运行该语句。
只需在您的mysql客户端(从服务器)上运行以下命令。
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
mysql> STOP SLAVE;
mysql> START SLAVE;
https://stackoverflow.com/questions/52374033
复制相似问题