程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user root@localhost for table accounts when using LOCK TABLES,

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

編輯:MySQL綜合教程

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'@'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)

要解決這個錯誤只需要修改MySQLBackup的配置文件,將參數CONFIG_mysql_dump_single_transaction設為'yes'即可解決問題。網上關於這個錯誤的解決方法也有設置--skip-lock-tables的

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved