前几天,老徐的istester博客突然挂了;收到了用户的反馈才知道 ;
!Lw8SM I5X0折腾了几次没发现原因;51Testing软件测试网z:g;D3bHp:ox.N
后面查了下数据库,才发现,是库出问题了;51Testing软件测试网QVe n*xW"]"Wx*Vc
51Testing软件测试网\!I/K}/l0k/Tx?.X
如下是报错内容 和解决思路 ;
!qHE!FL0
/AF3]\3B
O0~2`&n3H%`"?3SeV0mysql> select * from isTeter.com ;
Q5tdK#^6\N;P,rr(I1bu0ERROR 145 (HY000): Table './isTeter_Idoxu/isTeter.com' is marked as crashed and should be repaired
Hfs,n-rgxI0
Dz8~
@%b:u%M0mysql> check table isTeter.com ;
mGY,J\ H#yM0+-----------------------------+-------+----------+------------------------------------------------------------+
1w&e;cY!p`0| Table | Op | Msg_type | Msg_text |51Testing软件测试网"yN*o} aa!R J w{
+-----------------------------+-------+----------+------------------------------------------------------------+51Testing软件测试网:z8_CQ5\n-s.]
| isTeter_Idoxu.isTeter.com | check | warning | Table is marked as crashed |51Testing软件测试网7^ef*W;OOq&hDE
| isTeter_Idoxu.isTeter.com | check | warning | 102 clients are using or haven't closed the table properly |
V`R^!S0| isTeter_Idoxu.isTeter.com | check | error | Checksum for key: 4 doesn't match checksum for records |
rN,HQ+D |%c ~0| isTeter_Idoxu.isTeter.com | check | error | Corrupt |51Testing软件测试网6vg'aM.V E:V4_
+-----------------------------+-------+----------+------------------------------------------------------------+
L\P)RuO)[S)P04 rows in set (0.31 sec)
{naD
P#L1t
Xx0
51Testing软件测试网2xAtE
c"UG!?.w\ rw
mysql> repair table isTeter.com;
zI9aZ`
B0+-----------------------------+--------+----------+----------+
8Zz&zrK
z&oxI(bn0| Table | Op | Msg_type | Msg_text |51Testing软件测试网I'tl9@"jd+C9V2x
+-----------------------------+--------+----------+----------+51Testing软件测试网S?#T`:e p&\O
z
| isTeter_Idoxu.isTeter.com | repair | status | OK |51Testing软件测试网 X,E@8OhTGG
+-----------------------------+--------+----------+----------+
!ql*G*a2FR01 row in set (0.15 sec)
+@&ICR*D I0
G1YVi&Mk,cTY$y0mysql> check table isTeter.com;51Testing软件测试网]1|:ELrOY(W:x"l
_G
+-----------------------------+-------+----------+----------+51Testing软件测试网e;n8C"n]
| Table | Op | Msg_type | Msg_text |
$i3s^t\aq0+-----------------------------+-------+----------+----------+
%~l&P,L"E9q;B-SL0| isTeter_Idoxu.isTeter.com | check | status | OK |51Testing软件测试网-xnMaSN~-Xt
+-----------------------------+-------+----------+----------+
}^
|0p7Tet01 row in set (0.01 sec)
5r#v3z!?1z?0
51Testing软件测试网0sz9[.udHQn0Lo,Rm
%drc5?3\MQ8h0搞定 ;
.o9a2_+I$os0