Skip to content

Mysqldump: Failed to dump mysql databases information_schema

backupninja --debug --now --run /etc/backup.d/10_all_databases.mysql

gives me: @Debug: su root -c "/usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-tables --complete-insert --add-drop-table --quick --quote-names information_schema -r /var/backups/mysql/sqldump/information_schema.sql" Warning: mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES Warning: Failed to dump mysql databases information_schema @

/etc/backup.d/10_all_databases.mysql: @dbhost = localhost databases = all backupdir = /var/backups/mysql hotcopy = no sqldump = yes compress = no configfile = /etc/mysql/debian.cnf @

backupninja v. 0.9.6-4 mysql-client-5.1 v. 5.1.41-3ubuntu7

Using additional "--single-transaction" or "--lock-all-tables" instead of "--lock-tables" works:

@Debug: su root -c "/usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-tables --complete-insert --add-drop-table --quick --quote-names --single-transaction information_schema -r /var/backups/mysql/sqldump/information_schema.sql" Info: Successfully finished dump of mysql database information_schema

Debug: su root -c "/usr/bin/mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --lock-all-tables --complete-insert --add-drop-table --quick --quote-names information_schema -r /var/backups/mysql/sqldump/information_schema.sql" Info: Successfully finished dump of mysql database information_schema @

While debugging i found that the variable sqldumpoptions is ignored in /etc/backup.d/10_all_databases.mysql, and is hardcoded in /usr/share/backupninja/mysql, even if the current documentation lists the variable sqldumpoptions. It would be very useful to be able to pass options to mysqldump.

(from redmine: created on 2010-03-25, closed on 2010-06-24)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information