mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES

我是把一些mysqldump语句放在一个批量命令文件(传说中的.sh文件)中执行的,而当我把这些
mysqldump语句分离开来一个一个执行的时候,我发现是没有任何错误的,于是在网络上找了一些资料:
发现是mysql默认数据库里的logs表,不能被加锁(lock tables)引起的。
于是我测试了一下,把关于mysql这个默认数据库相关的语句清空后,整个文件即可正常运行。
还有一个解决方法:
便是在mysql这个数据库相关的那句mysqldump加上 --lock-tables=0 这个参数,不锁表备份,也是可行的。

mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES的更多相关文章

  1. (转)mysqldump: Got error: 1556: You can't use locks with log tables.

    mysqldump: Got error: 1556: You can't use locks with log tables. 原文:http://blog.51cto.com/oldboy/112 ...

  2. mysqldump: Got error: 1044: Access denied for user 'root'@'%' to database 'hhh' when using LOCK TABLES

    错误原因:mysqldump 命令执行时,需要四种权限,分别是:select,show view,trigger,lock table.但是因为没有lock table的权限,导致上述错误发生. 修改 ...

  3. mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES

    AutoMySQLBackup备份时,出现mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@' ...

  4. 解决mysqldump: Got error: 1044: Access denied for user

    转自:http://blog.slogra.com/post-512.html 今天给新加的几个数据库备份,在执行mysqldump的时候,居然报mysqldump: Got error: 1044: ...

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

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

  6. Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: Got error: 1449: The user specified as a definer ('fk_system'@'localhost') does not exist when using LOCK TABLES

    在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...

  7. MySQL 导出数据库,出现 “mysqldump: Got error: 1146”

    出现场景 在 cmd 导出数据库时: mysqldump -hlocalhost -uroot -p student_db > C:\student_db.sql 出现: mysqldump: ...

  8. mysqldump: Got error: 1066: Not unique table/alias

    mysqldump: Got error: 1066: Not unique table/alias myql 导出时提示如下: [root@localhost mysql]# mysqldump  ...

  9. mysqldump: Got error: 1356 mysqldump的重要参数--force

    一个MySQL的备份突然变小了很多,但实际的数据量却一直在增长.备份脚本也没有调整过.为什么呢? 重现了一下备份过程,发现备份中遇到了如下错误: mysqldump: Got error: 1356: ...

随机推荐

  1. 直接用bat命令对Inno Setup的脚本文件.iss进行编译

    直接用bat命令对Inno Setup的脚本文件.iss进行编译 2010-06-17 15:17 qjn0059 | 浏览 2163 次 编程语言外语学习 分享到:   2010-06-29 11: ...

  2. C#里partial关键字的作用(转摘)

    C#里partial关键字的作用(转摘) 1. 什么是局部类型? C# 2.0 引入了局部类型的概念.局部类型允许我们将一个类.结构或接口分成几个部分,分别实现在几个不同的.cs文件中. 局部类型适用 ...

  3. magento和discuz(ucenter)整合集成开发思路

    discuz自带ucenter,主要就是用于和其他程序的通信.我们可以下载discuz的ucenter开发手册进行magento和discuz的集成.里面有一些ucenter的一些接口函数和参数说明, ...

  4. 原来DataTable的Distinct竟如此简单!

    DataView可以帮我们直接获取Distinct数据, DataTable dataTable;DataView dataView = dataTable.DefaultView; DataTabl ...

  5. windows服务部署与卸载

    同事问到windows service的东东,现在整理一下,用c#如何创建一个windows service,以及如何调试.部署.卸载. 一.创建windows service 1. 打开VS2008 ...

  6. nginx+fast-cgi+c

    1. 下载fastcgi开发包,编译安装 http://www.fastcgi.com/dist/fcgi-current.tar.gz #wget http://www.fastcgi.com/di ...

  7. VMDK镜像迁移到KVM(二)

    KVM has the ability to use VMware's .vmdk disk files directly, as long as the disk is wholly contain ...

  8. lanuchy快捷操作

    down arrow: display history shift+delete: remove the item from the distory

  9. 转载:LBP代码详细注释

    %LBP returns the local binary pattern image or LBP histogram of an image.% J = LBP(I,R,N,MAPPING,MOD ...

  10. python 函数基础

    定义: def intersect(seq1,seq2): res = [] for x in seq1: if x in seq2: res.append(x) yield res 运行效果 > ...