It is simple the user just needs to be given the "LOCK TABLES" privilege.
As root run this command:
GRANT LOCK TABLES ON yourdatabase.* TO yourmysqluser@localhost;
mysqldump, user, localhost, database, thedb, tablesit, quot, yourdatabase, yourmysqluser,