zbx mysql db修复

mysql 因宿主机宕机导致无法启动 虚拟机里运行的zbx无法使用

修复数据表操

MYSQL数据表出现问题,提示:
Error: Table ‘./db_name/table_name’ is marked as crashed and last (automatic?) repair failed

修复数据表操作:

1、service mysqld stop;
2、cd /var/lib/mysql/db_name/
3、myisamchk -r tablename.MYI (修复单张数据表)
myisamchk -r *.MYI (修复所有数据表)

提醒:

vi /etc/my.cnf把里面的 log-bin 这一行注释掉,重启mysql服务即可。

Replication Master Server (default)

binary logging is required for replication

log-bin=mysql-bin

监控添加https://blog.51cto.com/215687833/1784173

zbx ping监控: https://blog.csdn.net/reblue520/article/details/76286911
特殊权限参考:https://www.cnblogs.com/Latiny/p/11094436.html

猜你喜欢

转载自blog.csdn.net/wuxingpu5/article/details/106069245