博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cacti监控机硬盘满了,于是mysql的表损坏了,通过查看cacti日志的报错信息,搜索到解决办法...
阅读量:6983 次
发布时间:2019-06-27

本文共 3712 字,大约阅读时间需要 12 分钟。

[root@w log]# mysql -u root -p cacti

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17497 to server version: 4.1.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use "cacti"

Database changed
mysql> select count(*) from poller_output;
ERROR 1146 (42S02): Table 'cacti.poller_output' doesn't exist
mysql> truncate table poller_output;
ERROR 1146 (42S02): Table 'cacti.poller_output' doesn't exist
mysql>

[root@w log]# cd /var/www/html/cacti/
[root@w cacti]# mysql -uroot -p cactidb <cacti.sql
Enter password:
ERROR 1050 (42S01) at line 5: Table 'cdef' already exists
[root@w cacti]# mysql -uroot -p cactidb <cacti.sql
Enter password:
ERROR 1050 (42S01) at line 5: Table 'cdef' already exists
[root@w cacti]# mysql -u root -p cactidb
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 17504 to server version: 4.1.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> mysql -u root -p cacti

-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p cacti' at line 1
mysql> select count(*) from poller_output;
ERROR 1017 (HY000): Can't find file: 'poller_output' (errno: 2)
mysql> truncate table poller_output;
Query OK, 0 rows affected (0.00 sec)

mysql>

[cacti@w log]$ pwd

/var/www/html/cacti/log
[cacti@w log]$ tailf /var/www/html/cacti/log/cacti.log

 

[cacti@w ~]$ tailf /var/www/html/cacti/log/cacti.log

07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (102, 'mem_free', '2012-07-06 09:25:03', '19888480')'
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (101, 'mem_cache', '2012-07-06 09:25:03', '29620896')'
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (100, 'mem_buffers', '2012-07-06 09:25:03', '135964')'
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (99, 'load_5min', '2012-07-06 09:25:03', '5.75')'
07/06/2012 09:25:03 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1017', SQL:"insert into poller_output (local_data_id, rrd_name, time, output) values (98, 'load_15min', '2012-07-06 09:25:03', '5.47')'

 参考资料参加地址: 

转载于:https://www.cnblogs.com/taosim/archive/2012/07/09/2582759.html

你可能感兴趣的文章
网络嗅探软件全接触(2)
查看>>
Redis中的关系查询(范围查询,模糊查询等...)
查看>>
Phalcon入门教程之模型CURD(2)
查看>>
四川成立大数据发展研究会 拟建公共云暨数据交易中心
查看>>
安全公司发现针对印度外交部与军事机构的间谍活动
查看>>
无接口.NET代码的单元测试
查看>>
数据库产品如何选型
查看>>
日本外务省新设网络安全保障政策室
查看>>
美“智能城市挑战赛”决赛名单公布:7座城市入围
查看>>
企业全光网将成运营商部署千兆接入的商业驱动力
查看>>
2030年实现全球10TW的光伏目标 太阳能电池需要哪些突破?
查看>>
2017年物联网五大趋势
查看>>
流量劫持已成行业毒瘤,不正当竞争当严惩
查看>>
最让程序员懊恼的 10 件事
查看>>
Iframe高度自适应(兼容IEFirefox、同域跨域)
查看>>
Google 工程师如何发现 Heartbleed 漏洞
查看>>
《Python面向对象编程指南》——2.8 __new__()方法和不可变对象
查看>>
ROS机器人程序设计(原书第2版)第1章 ROS Hydro系统入门
查看>>
《Android平板电脑开发秘籍》——3.9节技巧:创建一个下拉列表式的ActionBar
查看>>
剖析一个java对象初始化顺序问题
查看>>