출처 : http://www.zabbix.com/forum/showthread.php?t=25147
This is a guide for people that normally never work with mysql stuff.
My main problem is that my zabbix InnoDB database get corrupted now and then
(sometimes every month , sometimes less, Running under centos , vmware)
(problem started after a few years of collecting data)
I just wanted to share how to repaired my InnoDB and got my Zabbix up and running again.
(Iam using Centos and webmin installed)
1. service zabbix_server stop
2. Edit /etc/my.cnf
Add this line to the config: innodb_force_recovery = 4
3. service mysqld restart
4. If you don't have webmin installed you can download it from www.webmin.com or use any other mysql tool.
Backup the databse called zabbix
Example: Successfully backed up 236040666 bytes from database zabbix to file /root/zabbix.sql
!!!Make sure you made a full backup and know where you placed it!!!
5. Edit /etc/my.cnf
Remove the line by adding a # infront of it. #innodb_force_recovery = 4
6. service mysqld restart
7. Enter webmin or any other mysqltool and DROP zabbix database (will remove all data)
8. Create a new database and name it zabbix
9. Enter the new databse named zabbix and perform the command: execute sql file and select the
backup you made in step 4 (/root/zabbix.sql)
This step will take some time if you have lots of data. (2-15 mins)
10. service zabbix_server start
11. done, errors gone, data base is fixed, atleast for me!
Good luck!
My main problem is that my zabbix InnoDB database get corrupted now and then
(sometimes every month , sometimes less, Running under centos , vmware)
(problem started after a few years of collecting data)
I just wanted to share how to repaired my InnoDB and got my Zabbix up and running again.
(Iam using Centos and webmin installed)
1. service zabbix_server stop
2. Edit /etc/my.cnf
Add this line to the config: innodb_force_recovery = 4
3. service mysqld restart
4. If you don't have webmin installed you can download it from www.webmin.com or use any other mysql tool.
Backup the databse called zabbix
Example: Successfully backed up 236040666 bytes from database zabbix to file /root/zabbix.sql
!!!Make sure you made a full backup and know where you placed it!!!
5. Edit /etc/my.cnf
Remove the line by adding a # infront of it. #innodb_force_recovery = 4
6. service mysqld restart
7. Enter webmin or any other mysqltool and DROP zabbix database (will remove all data)
8. Create a new database and name it zabbix
9. Enter the new databse named zabbix and perform the command: execute sql file and select the
backup you made in step 4 (/root/zabbix.sql)
This step will take some time if you have lots of data. (2-15 mins)
10. service zabbix_server start
11. done, errors gone, data base is fixed, atleast for me!
Good luck!
'::: 오픈소스 ::: > Zabbix' 카테고리의 다른 글
Zabbix 서버에 TSM Client 설치시 libstdc++ 오류발생 및 조치방법 (0) | 2012.03.21 |
---|---|
Zabbix 관련 서비스 STOP/START (0) | 2012.03.16 |
Zabbix Mysql DB 패스워드 변경 관련 후속조치 (0) | 2012.03.16 |
Zabbix 한글 설정 후 그래프 화면의 한글이 깨질 경우 조치방법 (1) | 2011.12.29 |
Zabbix 템플릿 Export/Import 오류 조치방법 (0) | 2011.11.18 |