昨天,校党委宣传部的W老师打电话向我寻求帮助,说中南民大论坛MySQL数据库发生故障,他们试图用5月7日的数据库备份去恢复,但没有成功。我晚上回宿舍后,登录到民大论坛服务器上一看,原来是论坛MySQL数据库的一张MySQL表损坏。根据我的经验,成功修复MySQL损坏表的概率是90%,根本没有必要急着去用旧的数据库备份去恢复,何况备份又不及时,5月7日到发生故障的5月22日,意味着要丢失15天的数据啊。

  我修复了5月22日的数据库,故障发生之前的数据没有丢失。方法很简单,四步即可搞定。

  ①、用root帐号从命令行登录MySQL:
  mysql -u root -p

  ②、输入root帐号的密码。

  ③、选定数据库名(本例中的数据库名为studentmis):
  use studentmis;

  ④、修复损坏的表(本例中要修复的表为smis_user_student):
  repair table smis_user_student;

  点击在新窗口中浏览此图片

  注:以上操作适用于MySQL的MyISAM表存储结构。


Tags: ,
技术大类 » 数据库技术 | 评论(12) | 引用(0) | 阅读(13741)
jitaolee
2007-5-24 07:59
我现在正在学习mysql,感觉现在搞网站管理,不懂mysql是迈不开步的.
稚鹰
2007-6-9 09:51
呵呵,中南民大论坛MySQL数据库发生故障的同时,在民大的另一个网站的数据库也出现了同样的错误,解决方法也是同样的方法。
浪人
2007-6-21 16:31
我修复发生
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 'tabe
rco_cert
repair tabe rco_cert' at line 1
浪人
2007-6-21 16:47
移了一下数据库语法不对喃
浪人
2007-6-21 17:11
Warning: Cannot modify header information - headers already sent by (output started at D:\APMServ5.2.0\www\phpMyAdmin\export.php:150) in D:\APMServ5.2.0\www\phpMyAdmin\libraries\header_http.inc.php on line 13

导出后是这样的
Warning: Cannot modify header information - headers already sent by (output started at D:\APMServ5.2.0\www\phpMyAdmin\export.php:150) in D:\APMServ5.2.0\www\phpMyAdmin\libraries\header_http.inc.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at D:\APMServ5.2.0\www\phpMyAdmin\export.php:150) in D:\APMServ5.2.0\www\phpMyAdmin\libraries\header_http.inc.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at D:\APMServ5.2.0\www\phpMyAdmin\export.php:150) in D:\APMServ5.2.0\www\phpMyAdmin\libraries\header_http.inc.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at D:\APMServ5.2.0\www\phpMyAdmin\export.php:150) in D:\APMServ5.2.0\www\phpMyAdmin\libraries\header_http.inc.php on line 19
久久乡情网 Email Homepage
2007-8-16 17:53
就这么四步就可以解决问题吗?很想试一试的,不过我一直没出现过问题!还请多指教!
不错的文章哦,支持一下!
骆驼
2008-3-13 16:17
mysql版本的问题,升级到mysql5.1.22即可解决。
fei
2008-11-21 14:58
修表其实也会丢数据。
小华
2010-9-30 14:29
你好  请问怎么判断的事数据表损坏
最好的巧克力品牌 Homepage
2011-2-25 17:22
最好的巧克力品牌
<a href=http://www.seo5200.com>最好的巧克力品牌</a>
seo52002011353761593-2011.2.25
中华 Homepage
2011-3-10 15:37
我站数据库有故障了www.xjdwx.com
louis vuitton uk Email Homepage
2011-11-23 08:45
This louis vuitton uk for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.You will easily notice the unfold zippers of this coach outlet store online. That is the decoration. There are some inside pockets for you as well. They are easy to match your clothes and to carry.Let us inspire your inner beauty with fine christian louboutin sale. Purse the elegance in bridal wedding. Enjoy the fashion.
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]