歡迎關注MySQL 8.0必知必會系列課程。

??? MySQL8.0必知必會-自動化部署??????????? https://edu.51cto.com/course/16368.html
??? MySQL8.0必知必會之參數標準化配置??????? https://edu.51cto.com/course/16358.html



1.Can't start server: Bind on TCP/IP port: Address already in use

2017-12-07T10:25:56.216309+08:00 0 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use

2017-12-07T10:25:56.216324+08:00 0 [ERROR] Do you already have another mysqld server running on port: 22308 ?

2017-12-07T10:25:56.216340+08:00 0 [ERROR] Aborting

故障處理

主要是改參數設置有問題,參數為

wsrep_node_address=192.168.192.65:22308

正確設置為:

wsrep_node_address=192.168.192.65


2.It may not be safe to bootstrap the cluster from this node

2017-12-15T13:11:30.237139+08:00 0 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates.

To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .

2017-12-15T13:11:30.237148+08:00 0 [ERROR] WSREP: Provider/Node (gcomm://10.66.192.65:4567,10.66.192.66:4567,10.66.192.67:4567) failed to establish connection with cluster (reason: 7)

2017-12-15T13:11:30.237158+08:00 0 [ERROR] Aborting

故障處理

集群本身無問題,只是非正常關閉

修改第一個啟動節點的grastate.dat文件,將

# GALERA saved state

version: 2.1

uuid:????? 8ed447b7-dafa-11e7-8071-a6ba78498531

seqno:???? -1

safe_to_bootstrap:?? 0?? 改為 1

然后可以直接啟動


3.Error in Log_event::read_log_event(): 'read error'

2017-12-15T15:16:35.195586+08:00 0 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 11730978, event_type: 51

2017-12-15T15:16:35.195606+08:00 0 [Warning] Error reading GTIDs from binary log: -1

故障處理

binlog參數設置過長,導致無法正確生成binlog和正常的讀取

log-bin???????????????????????? =/data/mysql/db_test1/binlog/192.168.10.128_test1_bin

log-bin-index=/data/mysql/db_test1/binlog/192.168.10.128_test1_bin.index

-rw-r--r-- 1 mysql mysql 177 Dec 15 15:19 192.168.10

-rw-r--r-- 1 mysql mysql? 40 Dec 15 15:17 192.168.10.128_test1_bin.index