Home >Database >Mysql Tutorial > mysqldump: Got error: 1556: You cant use locks with log tab

mysqldump: Got error: 1556: You cant use locks with log tab

WBOY
WBOYOriginal
2016-06-07 17:41:241782browse

mysql主从同步出现错误解决一例:本文出自老男孩linux运维实战培训内部教案内容整理总结FAQ:问题1:mysqldump:Goterror:1556:Youcantuselockswithlogtables.在老

mysql主从同步出现错误解决一例:本文出自老男孩linux运维实战培训内部教案内容整理总结

    在老男孩带学生做主从同步实践时,发现学生实践操作时遇到如下问题无法解决,于是,老男孩把解决的过程总结如下:

[root@Oldboy ~]# mysqldump -uroot -p'oldboy' -S /data/3306/mysql.sock -A -B >a.sql

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

解决过程:

[root@Oldboy ~]# which mysqldump

/usr/bin/mysqldump

[root@oldboy ~]# tail -1 /etc/profile

export PATH=$PATH:/application/mysql/bin

[root@oldboy ~]# tail -1 /etc/profile

export PATH=/application/mysql/bin:$PATH

[root@Oldboy ~]# . /etc/profile

[root@Oldboy ~]# echo $PATH

/application/mysql/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/root/bin:/usr/local/mysql/bin:/application/mysql5.1.65/bin:/application/apache/bin

[root@Oldboy ~]# which mysqldump

/application/mysql/bin/mysqldump

此时在导出数据库:

[root@Oldboy ~]#mysqldump -uroot -p'oldboy' -S /data/3306/mysql.sock -A -B >a.sql

可以正常导出了。

下面该同学搜索的,其他网友的同样报错的另外一个问题的文章:

mysqldump You can’t use locks with log tables  11-01-13 11:05:02

分类: Mysql/postgreSQL

最近在做数据库备份的时候,遇到这样的一个错误:

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


mysqldump
语句分离开来一个一个执行的时候,美国空间,我发现是没有任何错误的,香港服务器,于是在网络上找了一些资料:


还有一个解决方法:

本文出自 “老男孩linux运维” 博客,网站空间,请务必保留此出处

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn