在给mysql数据库备份时,报错:

mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as c
rashed and should be repaired when using LOCK TABLES

如上错误的解决方法如下:
1、进入数据库对该表进行检测:

mysql> check tables pre_forum_thread;
+------------------------------+-------+----------+-----------------------------
--------------------------+
| Table | Op | Msg_type | Msg_text
|
+------------------------------+-------+----------+-----------------------------
--------------------------+
| shengdaxcom.pre_forum_thread | check | warning | Table is marked as crashed
|
| shengdaxcom.pre_forum_thread | check | warning | 1 client is using or hasn't
closed the table properly |
| shengdaxcom.pre_forum_thread | check | error | Size of indexfile is: 845824
Should be: 846848 |
| shengdaxcom.pre_forum_thread | check | error | Corrupt
|
+------------------------------+-------+----------+-----------------------------
--------------------------+
4 rows in set (0.06 sec)

2、使用repair解决方法:

mysql> repair tables pre_forum_thread;
+------------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+------------------------------+--------+----------+----------+
| shengdaxcom.pre_forum_thread | repair | status | OK |
+------------------------------+--------+----------+----------+
1 row in set (0.31 sec)

再次进行dump备份就可以了。

其他参考:

只要在mysqldump的时候加上--lock-tables=false就可以解决问题。
mysqldump -u root -pMyPassword DbName --lock-tables=false > data.sql

在给mysql数据库备份时,报错: mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as c rashed and should be repaired when using LOCK TABLES的更多相关文章

  1. mysql数据库导出时报错mysqldump: Got error: 145的解决方法

      在给mysql数据库备份时,报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed ...

  2. 访问远程mysql数据库,出现报错,显示“1130 - Host'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server“

    在使用Navicat for MySQl访问远程mysql数据库,出现报错,显示“1130 - Host'xxx.xxx.xxx.xxx' is not allowed to connect to t ...

  3. django2.0+连接mysql数据库迁移时候报错

    django2.0+连接mysql数据库迁移时候报错 情况一 错误信息 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 ...

  4. mac系统中搭建apache+mysql+php的开发环境,安装mysql后,登录报错:mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    php新手在mac系统中搭建apache+mysql+php的开发环境(按照这篇博客来操作的:http://my.oschina.net/joanfen/blog/171109?fromerr=xvC ...

  5. mysql数据库备份及恢复命令mysqldump,source的用法

    还原一个数据库:mysql -h localhost -u root -p123456 www<c:/www.sql 备份一个数据库:mysqldump -h localhost -u root ...

  6. 最近使用Navicat for MySQl访问远程mysql数据库,出现报错,显示“2003- Can't connect MySQL Server on 'localhost'(10038)“。

    优先考虑mysql数据库是否开启 1.先看报错窗口.   通过百度,最终找到的原因是:远程3306端口未对外开放. 于是下面进行远程3306端口开放操作.   首先远程连接服务器,点击“开始”-“管理 ...

  7. ubuntu系统中出现mysql数据库无法启动报错2002该怎么处理,具体报错信息如正文所示

    python@ubuntu:~$ mysql -uroot -pmysqlmysql: [Warning] Using a password on the command line interface ...

  8. 远程测试mysql数据库3306端口报错

    错误现象:[root@localhost ~]# telnet 192.168.10.130 3306Trying 192.168.10.130...Connected to 192.168.10.1 ...

  9. MySql数据库 主从复制/共享 报错

    从 获取不到 共享主的数据, 错误信息: Waiting for master to send event 解决方案: // 1. 从V表获取PrNo的数据 select * from Vendor_ ...

随机推荐

  1. 反汇编->C++内联

    C/C++提供了内联函数机制 内联函数就是向编译器建议:编译这个函数的时候.直接把函数展开,而不是进行函数调用call.当然编译器并不接受这个建议.仍然把他当做普通函数进行编译 使用内联函数的优点:减 ...

  2. configure.ac:3: error: Autoconf version 2.68 or higher is required

    configure.ac:3: error: Autoconf version 2.68 or higher is required 参考博客:https://blog.csdn.net/pretty ...

  3. POJ 1011:木棒

    传送门 http://poj.org/problem?id=1011 题目大意 已知原来有等长若干木棒,现在给你一堆断了的木棒的长度,问原来的木棒最短是多长 题目类型 DFS + 剪枝 + “贪心优化 ...

  4. ecshop二次开发系统缓存优化之扩展数据缓存的必要性与方法

    1.扩展数据缓存的必要性 大家都知道ecshop系统使用的是静态模板缓存,在后台可以设置静态模板的缓存时间,只要缓存不过期,用户访问页面就相当于访问静态页面,速度可想而知,看似非常完美,但是ecsho ...

  5. babel转码神器babel-preset-env

    简介 现如今不同的浏览器和平台chrome, opera, edge, firefox, safari, ie, ios, android, node, electron 不同的模块 "am ...

  6. Linux Root下的.gvfs出现异常解决办法(导致source失败,自启动失败)

    原文地址:   http://www.cnblogs.com/tdyizhen1314/p/4142991.html 在linux系统下安装软件或复制文件的时候,复制不成功,出现错误如下: error ...

  7. Codeforces Gym 100338C Important Roads 最短路+Tarjan找桥

    原题链接:http://codeforces.com/gym/100338/attachments/download/2136/20062007-winter-petrozavodsk-camp-an ...

  8. 基于python脚本的对拍debug

    首先,这是python脚本 import os; for i in range(0,20): print ("Case:"+str(i)); print ("random ...

  9. Android动画系列 - PropertyAnim 详解

    前言:上一篇文章传统View动画与Property动画基础及比较简单对Android动画系统的基础做了介绍,本篇文章将对PropertyAnimation进行全面深入的探讨,本篇文章可以分为两大块,从 ...

  10. POJ2503字典树

    此代码原始出处:http://blog.csdn.net/cnyali/article/details/47367403 #include<stdio.h> #include<str ...