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
Was this topic helpful?
Document Information
Modified date:
09 September 2018
UID
isg3T1014194