IBM Support

mysqldump error 1044

Troubleshooting


Problem

mysqldump error 1044

Resolving The Problem

Would someone please let me know what I need to do to fix the following error ?
/etc/cron.daily/backup-cluster-db:
mysqldump: Got error: 1044: Access denied for user 'apache'@'localhost' to
database 'cluster' when using LOCK TABLES

This error is due to that the mysql account "apache" does not have the Lock_Table privilege. The "--opt" option in mysqldump includes "--lock-tables" that requires Lock_Table privilege and this causes the error.

Could you follow the steps below to resolve the problem:

1. as root,

# mysql -u root -p

you will be prompted for password for root. After login in, mysql prompt will be displayed.

2. In mysql prompt, key in

GRANT LOCK TABLES ON cluster.* TO apache@'localhost';

FLUSH PRIVILEGES;

quit

3. test by

# mysqldump -u apache --opt cluster /root/mysql-backup-cluster

 

[{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"4.4.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSZUCA","label":"IBM Spectrum Cluster Foundation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
09 September 2018

UID

isg3T1014194