Fix mysqldump error “Access denied while using LOCK TABLES“

Use option --single-transaction

When --single-transaction is used with mysqldump command, the dump process ensures no other connection should use the statements such as ALTER TABLE, CREATE TABLE, DROP TABLE, RENAME TABLE etc.

According to the MySQL documentation, it’s good idea to use --single-transaction option with --quick option while dumping large tables.