gpt4 book ai didi

Mysql Slave最后一个错误和sql线程

转载 作者:行者123 更新时间:2023-11-29 12:40:03 25 4
gpt4 key购买 nike

我使用show Slave status\G,结果如下:

         Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1008
Last_Error: Error 'Can't drop database 'hehe'; database doesn't exist' on query. Default database: 'hehe'. Query: 'drop database hehe'

我猜 Slave_SQL_RunningNO 的原因是 Last_Error,因为我在构建之前在主数据库上手动创建了一个表主从集群,然后我将表放在主服务器上。

当这种情况发生时,有没有办法提醒人们?喜欢发送邮件或短信吗?

最佳答案

最好的办法是

Manually: Execute SHOW GLOBAL STATUS like 'slave_running' and SHOW SLAVE STATUS periodically and store it in a file. Check the contents of the file periodically to see if any of your replicas have stopped replicating. On Linux, you can have a cron job setup which executes these queries periodically and even configure to send email alert if slave_running value is ‘NO’.

对于more

关于Mysql Slave最后一个错误和sql线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26248792/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com