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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章