Shutting down MySQL.Terminated ERROR! The server quit without updating PID file (/data/mysql/logs/m

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之前

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值