I have been looking for a user and assign specific permission to backup my database using a batch program.
First create a user using below query.
CREATE USER ‘backup’@’localhost’ IDENTIFIED BY ‘secret’;
Use below query to assign permission he would require to create backup of databases.
GRANT SELECT, SHOW VIEW, RELOAD, REPLICATION CLIENT, EVENT, TRIGGER, LOCK TABLES ON *.* TO ‘backup’@’localhost’;