在给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 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的更多相关文章
- mysql数据库导出时报错mysqldump: Got error: 145的解决方法
在给mysql数据库备份时,报错:mysqldump: Got error: 145: Table './jxzhtopenfire/ofoffline' is marked as crashed ...
- 访问远程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 ...
- django2.0+连接mysql数据库迁移时候报错
django2.0+连接mysql数据库迁移时候报错 情况一 错误信息 django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 ...
- 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 ...
- mysql数据库备份及恢复命令mysqldump,source的用法
还原一个数据库:mysql -h localhost -u root -p123456 www<c:/www.sql 备份一个数据库:mysqldump -h localhost -u root ...
- 最近使用Navicat for MySQl访问远程mysql数据库,出现报错,显示“2003- Can't connect MySQL Server on 'localhost'(10038)“。
优先考虑mysql数据库是否开启 1.先看报错窗口. 通过百度,最终找到的原因是:远程3306端口未对外开放. 于是下面进行远程3306端口开放操作. 首先远程连接服务器,点击“开始”-“管理 ...
- ubuntu系统中出现mysql数据库无法启动报错2002该怎么处理,具体报错信息如正文所示
python@ubuntu:~$ mysql -uroot -pmysqlmysql: [Warning] Using a password on the command line interface ...
- 远程测试mysql数据库3306端口报错
错误现象:[root@localhost ~]# telnet 192.168.10.130 3306Trying 192.168.10.130...Connected to 192.168.10.1 ...
- MySql数据库 主从复制/共享 报错
从 获取不到 共享主的数据, 错误信息: Waiting for master to send event 解决方案: // 1. 从V表获取PrNo的数据 select * from Vendor_ ...
随机推荐
- 怎样更改SQL Server 2008的身份验证方式(转)
原文转自 http://blog.csdn.net/zjx86320/article/details/9745669 大家都知道sql server 有两种登录验证方式,即sql se ...
- 转 PHP 使用 Redis
PHP 使用 Redis PHP 使用 Redis 安装 开始在 PHP 中使用 Redis 前, 我们需要确保已经安装了 redis 服务及 PHP redis 驱动,且你的机器上能正常使用 PHP ...
- CMake安装或CMake Error at CMakeLists
CMake安装或CMake Error at CMakeLists 发生情景: 使用cmake命令安装软件时,报如下错误: CMake Error at CMakeLists.txt:4 (CMAKE ...
- Linux 之 文件搜索命令
文件搜索命令 参考教程:[千峰教育] 文件搜索定位 grep: 作用:通用规则表达式分析程序,是一种强大的文本搜索工具, 它能使用正则表达式搜索文本,并把匹配的行打印出来. 格式:grep [选项] ...
- dedecms--数据库
最近在用dedecms做项目,dedecms里面有数据库操作类,其实这个在实际项目中用起来还是很方便的. 1:引入common.inc.php文件 require_once (dirname(__FI ...
- java 四种方式实现字符流文件的拷贝对比
将D:\\应用软件\\vm.exe 拷贝到C:\\vm.exe 四种方法耗费时间对比 4>2>3>1 package Copy; import java.io.Buffere ...
- 神秘的FrontCache
用jmap -histo的时候,发现堆内存中有很多奇怪的对象,其class name为 java.util.HashMap$FrontCache 跳转到HashMap的源码中,直接搜索FrontCac ...
- 设计模式原来如此-策略模式(Strategy Pattern)
策略模式中体现了两个非常基本的面向对象设计的原则:1.封装变化的概念.2.编程中使用接口,而不是对接口的实现. 策略模式的定义:定义一组算法,将每个算法都封装起来,并使它们之间可以互换.策略模式使这些 ...
- VUE2.0 【v-html】标签使用技巧
<div class="active-rules"> <div class="weui-weixin-content" id="ru ...
- FMDB支持的事务类型
FMDB支持的事务类型 在数据库中,事务可以保证数据操作的完整性.当存在大量并发操作,容易出现死锁问题.在SQLite中,为了解决该问题,提供三种事务模式,分别为DEFFERED.IMMEDIAT ...