PRIVILEGES OF MYSQL BACKUP USER FOR MYSQLDUMP

on November 10th, 2016 by Hades | No Comments »

Please do not use the root user for mysqldump backups. Just create a new user with the following minimal MySQL privileges:

MYSQLDUMP –SINGLE-TRANSACTION (INNODB)

CREATE USER 'backup'@'localhost' IDENTIFIED BY 'secret';
GRANT SELECT, SHOW VIEW, RELOAD, REPLICATION CLIENT, EVENT, TRIGGER ON *.* TO 'backup'@'localhost';

MYSQLDUMP –LOCK-ALL-TABLES (MYISAM)

GRANT LOCK TABLES ON *.* TO 'backup'@'localhost';

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.