Shutting down MySQL.Terminated
ERROR! The server quit without updating PID file (/data/mysql/logs/mysql.pid).
ERROR! Failed to stop running server, so refusing to try to start.
解决方案:
因为我配置了主从同步,主服务器可以正常重启,从服务器报这个错误。
目前的问题只需要重新配置主从同步就好
进入master
mysql> show master status;
+----------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+----------------------+----------+--------------+------------------+
| localhost-bin.000094 | 33622483 | | |
+----------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
然后到slave服务器上执行手动同步:
#因为之前已经创建过主节点,需停掉之前的配置 再重新配置
stop slave;
reset master;
change replication source to source_host='',source_user='',source_password='',source_log_file='',source_log_pos= ;
上述是8.0.23中的语法。如果MySQL是8.0.23之前的版本,执行如下SQL;
change master to master_host='192.168.108.120',master_user='itcast',master_password='123456',master_log_file='binlog.000002',master_log_pos=155;
start replica; #8.0.22之后
start slave; #8.0.22之前