The following error messages are frequently encountered by EC2 instance users, particularly when they lack the privileges necessary to perform a database backup from the RDS MySQL.
mysqldump –no-create-db RetailDB –single-transaction –host MyInstance.rds.amazonaws.com -u auser –pPassword > dump.sql
mysqldump: Couldn’t execute ‘FLUSH TABLES’: Access denied
mysqldump: Couldn’t execute ‘FLUSH TABLES WITH READ LOCK’: Access denied for user ‘auser’@’%’ (using password: YES) (1045)
You can solve it by providing necessary privileges to the user or you simply remove –single-transaction from the mysqldump statement if you are backing up the database using a jump server.
Hope this helps.