在给mysql数据库备份时,报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed and should be repaired when using LOCK TABLES。
如上错误的解决方法如下:
1、进入数据库对该表进行检测:
mysql> check tables ofoffline;
+-------------------------+-------+----------+-------------------------------------------------------+
| Table                   | Op    | Msg_type | Msg_text                                              |
+-------------------------+-------+----------+-------------------------------------------------------+
| jxzhtopenfire.ofoffline | check | warning  | Table is marked as crashed                            |
| jxzhtopenfire.ofoffline | check | warning  | 1 client is using or hasn't closed the table properly |
| jxzhtopenfire.ofoffline | check | error    | Record at pos: 1175720 is not remove-marked           |
| jxzhtopenfire.ofoffline | check | error    | record delete-link-chain corrupted                    |
| jxzhtopenfire.ofoffline | check | error    | Corrupt                                               |
+-------------------------+-------+----------+-------------------------------------------------------+
5 rows in set
2、使用repair解决方法:
mysql> repair table ofoffline;
+-------------------------+--------+----------+------------------------------------------+
| Table                   | Op     | Msg_type | Msg_text                                 |
+-------------------------+--------+----------+------------------------------------------+
| jxzhtopenfire.ofoffline | repair | warning  | Number of rows changed from 2349 to 2451 |
| jxzhtopenfire.ofoffline | repair | status   | OK                                       |
+-------------------------+--------+----------+------------------------------------------+
再次进行dump备份就可以了。

备份mysql数据库时报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed and should be repaired when using LOCK TABLES。

这样的错误。
搜索了一下,发现只要在mysqldump的时候加上--lock-tables=false就可以解决问题。
mysqldump -u root -pMyPassword DbName --lock-tables=false > data.sql

mysql数据库导出时报错mysqldump: Got error: 145的解决方法的更多相关文章

  1. AndroidStudio中利用git下载github或者git.oschina的代码时报错:repository test has failed解决方法

    作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985 QQ986945193 微博:http://weibo.com/mcxiaobing AndroidS ...

  2. navicat导入mysql数据库sql时报错

    今天运维的一个项目需要进入数据库修改下数据,MYSQL的数据库,我先导出了一份数据结构和数据,然后进行修改,改完后发现项目报错了...粗心大意哪改错了,赶紧恢复数据库,结果导入SQL时报错了,当时心凉 ...

  3. Git拉取项目时报错“remote: HTTP Basic: Access denied”解决方法

    问题: Git拉取项目时报错“remote: HTTP Basic: Access denied”,此问题多为本地密码与远端密码不符导致. 解决方法: 在下载地址中加上用户名和密码即可,如下: htt ...

  4. python中使用pip安装报错:Fatal error in launcher... 解决方法

    python安装了2和3版本在 cmd 中用pip报的错误为:Fatal error in launcher:Unable to create process using 这是因为你安装了python ...

  5. navicat导入mysql数据库sql时报错或数据不完全问题

    错误详情:[Err] [Imp] 2006 - MySQL server has gone away 或无提示错误,但是导入数据明显缺少字段和数据 找到服务器上的MYSQL安装目录下的my.ini文件 ...

  6. c#操作MySQL数据库中文出现乱码(很多问号)的解决方法

    前题:修改discuz论坛帖子老连接(从NT版转到PHP版的discuzX3),帖子里有很多引用,有链接都是.aspx这样的链接. 需要将这些链接改到当前论坛的链接. 思路:用asp.net程序获取含 ...

  7. Python安装numpy,pandas慢,超时报错,下载不了的解决方法

    由于python的默认源是国外的,所以下载的时候会很慢,甚至会出现超时下载失败,提供两个解决方法 1.设置pip的超时限制 打开cmd 输入pip --default-timeout=100 inst ...

  8. 无法删除MySql数据库,报错1010 error dropping

    环境:MySQL.Navicat 8 操作:Drop database testDB 报错:1010 error dropping database 解决方法:          ps -ef | g ...

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

    在给mysql数据库备份时,报错: mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as cra ...

随机推荐

  1. 教程-delphi的开源json库:superobject,用法简介

    困惑一天的问题 一个语句搞定了... 回头细说. superobject中的{$DEFINE UNICODE} 就是它,这是json官方推荐的Delphi处理json的包,地址: http://www ...

  2. ZOJ 1914 Arctic Network (POJ 2349) MST

    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1914 http://poj.org/problem?id=2349 题目大 ...

  3. java统计程序运行的时间

    耗时统计 第一种是以毫秒为单位计算的.long startTime = System.currentTimeMillis();    //获取开始时间 //程序做一些功能性的操作doSomething ...

  4. @ContextConfiguration注解说明

    @ContextConfiguration Spring整合JUnit4测试时,使用注解引入多个配置文件单个文件 @ContextConfiguration(Locations="../ap ...

  5. Http、Socket的区别

    转自:http://jingyan.baidu.com/article/08b6a591e07ecc14a80922f1.html 网络由下往上分为 物理层.数据链路层.网络层.传输层.会话层.表示层 ...

  6. GifView项目学习

    http://code.google.com/p/gifview/downloads/detail?name=GifViewDemo.rar&can=2&q= 加入jar包

  7. C#常用的集合类型(ArrayList类、Stack类、Queue类、Hashtable类、SortedList类)

    1.ArrayList类 ArrayList类主要用于对一个数组中的元素进行各种处理.在ArrayList中主要使用Add.Remove.RemoveAt.Insert四个方法对栈进行操作.Add方法 ...

  8. RHCA442学习笔记-Unit10内存地址及分配

      Unit 10 Memory Addressing and Allocation 内存地址及分配 学习目标: A. 虚拟地址与物理地 B. 调整内存地址分配 C. 解析内存溢出    10.1 O ...

  9. C# - 系统类 - Object类

    Object类 ns:System 此类是所有.NET Framework中的类的基类 Type类就派生自Object类 C#提供了object关键字来表示一个类实例的类型 而无需使用Object作为 ...

  10. Io_Language

    Object ancestor := method ( prototype := self proto if (prototype != Obejct, writeln ("Slots of ...