Create a new MySQL user dedicated to backups

Create a new MySQL user dedicated to backups

I recommend setting a new MySQL user for backups and never using the root MySQL account to do backups.

Step 1. Log on to MySQL as root:

mysql -u root -p

Step 2. Create a new user and grant all necessary permissions:

CREATE USER 'backup_user_name'@'localhost' IDENTIFIED BY 'my_pass';
GRANT SELECT, SHOW VIEW, RELOAD, EVENT, TRIGGER, LOCK TABLES ON *.* TO 'backup_user_name'@'localhost';
image 80 - Create a new MySQL user dedicated to backups

Now you can use that user for backing up MySQL databases.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.