1、前台app报错:

MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => INSERT INTO `ecshop`.`ecs_stats` ( ip_address, visit_times, browser, system, language, area, referer_domain, referer_path, access_url, access_time) VALUES ('113.135.118.20', '1', 'Safari 537.36', 'Windows XP', 'zh-CN,zh', 'IANA', '', '', '/index.php', '1384818765') ) [2] => Array ( [error] => Table './ecshop/ecs_stats' is marked as crashed and last (automatic?) repair failed ) [3] => Array ( [errno] => 144 ) )

2、登陆mysql查询结果:

root:bj85.4bo.cn:)[ecshop]> check table ecs_stats;
+------------------+-------+----------+-------------------------------------------------------+
| Table            | Op    | Msg_type | Msg_text                                              |
+------------------+-------+----------+-------------------------------------------------------+
| ecshop.ecs_stats | check | warning  | Table is marked as crashed and last repair failed     | 
| ecshop.ecs_stats | check | warning  | 1 client is using or hasn't closed the table properly | 
| ecshop.ecs_stats | check | warning  | Size of indexfile is: 4173824      Should be: 1024    | 
| ecshop.ecs_stats | check | error    | Record-count is not ok; is 406459   Should be: 0      | 
| ecshop.ecs_stats | check | warning  | Found 406459 parts                Should be: 0 parts  | 
| ecshop.ecs_stats | check | error    | Corrupt                                               | 
+------------------+-------+----------+-------------------------------------------------------+
6 rows in set (0.69 sec)


3、修复表:
(root:bj85.4bo.cn:)[ecshop]> repair table ecs_stats
    -> ;
+------------------+--------+----------+-----------------------------------------+
| Table            | Op     | Msg_type | Msg_text                                |
+------------------+--------+----------+-----------------------------------------+
| ecshop.ecs_stats | repair | warning  | Number of rows changed from 0 to 406459 | 
| ecshop.ecs_stats | repair | status   | OK                                      | 
+------------------+--------+----------+-----------------------------------------+
2 rows in set (2.77 sec)

(root:bj85.4bo.cn:)[ecshop]> check table ecs_stats;
+------------------+-------+----------+----------+
| Table            | Op    | Msg_type | Msg_text |
+------------------+-------+----------+----------+
| ecshop.ecs_stats | check | status   | OK       | 
+------------------+-------+----------+----------+
1 row in set (0.59 sec)


4、查看表结构:
(root:bj85.4bo.cn:)[ecshop]> show create table ecs_stats;
+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table     | Create Table