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

AutoMySQLBackup备份时,出现mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES错误,具体内容如下所示

[root@DB-Server ~]# /usr/bin/automysqlbackup /etc/automysqlbackup/myserver.conf

Parsed config file "/etc/automysqlbackup/automysqlbackup.conf"

# Checking for permissions to write to folders:

base folder /u03 ... exists ... ok.

backup folder /u03/mysqlbackup/ ... exists ... writable? yes. Proceeding.

checking directory "/u03/mysqlbackup//daily" ... exists.

checking directory "/u03/mysqlbackup//weekly" ... exists.

checking directory "/u03/mysqlbackup//monthly" ... exists.

checking directory "/u03/mysqlbackup//latest" ... exists.

checking directory "/u03/mysqlbackup//tmp" ... exists.

checking directory "/u03/mysqlbackup//fullschema" ... exists.

checking directory "/u03/mysqlbackup//status" ... exists.

# Testing for installed programs

WARNING: Turning off multicore support, since pigz isn't there.

mysql ... found.

mysqldump ... found.

# Parsing databases ... done.

======================================================================

AutoMySQLBackup version 3.0

http://sourceforge.net/projects/automysqlbackup/

Backup of Database Server - localhost

Databases - mysql,performance_schema,test

Databases (monthly) - mysql,performance_schema,test

======================================================================

======================================================================

Dump full schema.

Rotating 4 month backups for

======================================================================

======================================================================

Dump status.

Rotating 4 month backups for

======================================================================

Backup Start Time Sat Jul 11 22:12:31 CST 2015

======================================================================

Daily Backup ...

Daily Backup of Database ( mysql )

Rotating 6 day backups for mysql

----------------------------------------------------------------------

Daily Backup of Database ( performance_schema )

Rotating 6 day backups for performance_schema

----------------------------------------------------------------------

Daily Backup of Database ( test )

Rotating 6 day backups for test

----------------------------------------------------------------------

Backup End Time Sat Jul 11 22:12:31 CST 2015

======================================================================

Total disk space used for backup storage...

Size - Location

443k /u03/mysqlbackup/

======================================================================

###### WARNING ######

Errors reported during AutoMySQLBackup execution.. Backup failed

Error log below..

Warning: Using a password on the command line interface can be insecure.

Warning: Using a password on the command line interface can be insecure.

Warning: Using a password on the command line interface can be insecure.

Warning: Using a password on the command line interface can be insecure.

Warning: Using a password on the command line interface can be insecure.

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

Warning: Using a password on the command line interface can be insecure.

du: WARNING: use --si, not -H; the meaning of the -H option will soon

change to be the same as that of --dereference-args (-D)

clip_image001

要解决这个错误只需要修改MySQLBackup的配置文件,将参数CONFIG_mysql_dump_single_transaction设为'yes'即可解决问题。网上关于这个错误的解决方法也有设置--skip-lock-tables的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值