在给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. [转]常用iOS图片处理方法

    自:http://blog.sina.com.cn/s/blog_8988732e0100xcx1.html  ========== (one) UIImage 图像 等比例缩放=========== ...

  2. 解决win2008下IIS7的HTTP500错误

    造成500错误常见原因有:ASP语法出错.ACCESS数据库连接语句出错.文件引用与包含路径出错.使用了服务器不支持的组件如FSO等.另外,对于win2008的IIS默认不显示详细出错信息的问题以下就 ...

  3. 开发使用mysql的一些必备知识点整理(一)初阶

    简介 主要知识点包括:能够与mysql建立连接,创建数据库.表,分别从图形界面与脚本界面两个方面讲解 相关的知识点包括:E-R关系模型,数据库的3范式,mysql中数据字段的类型,字段约束 数据库的操 ...

  4. Python学习笔记2_一些小程序

    counts = [98,12,3,4,1,4,9,3821] minNum = min(counts) #print minNum minNum_index = counts.index(minNu ...

  5. Codeforces 235 E Number Challenge

    Discription Let's denote d(n) as the number of divisors of a positive integer n. You are given three ...

  6. see

    Description 问从点(0,0)能看到点(0,0)和(n,n)之间的矩形的多少个整数点,看到(x,y)代表点(0,0)和点(x,y)间没有其他整数点,如看不到(2,4)因为中间有点(1,2) ...

  7. Geoserver跨域请求设置

    使用OpenLayers请求GeoServer发布的WFS服务时,如果不是相同的域可能会出现如下问题. 已拦截跨源请求:同源策略禁止读取位于 http://localhost:8080/geoserv ...

  8. 这一篇里面有很多关于scala的list的操作的好的知识

    https://www.cnblogs.com/weilunhui/p/5658860.html 1.++[B]   在A元素后面追加B元素 1 2 3 4 5 6 7 8 9 10 11 12 13 ...

  9. [反汇编练习] 160个CrackMe之035

    [反汇编练习] 160个CrackMe之035. 本系列文章的目的是从一个没有任何经验的新手的角度(其实就是我自己),一步步尝试将160个CrackMe全部破解,如果可以,通过任何方式写出一个类似于注 ...

  10. C++ 用libcurl库进行http通讯网络编程 【转】

    http://www.cnblogs.com/moodlxs/archive/2012/10/15/2724318.html C++ 用libcurl库进行http通讯网络编程 目录索引: 一.Lib ...