This HOWTO discusses two (unrelated) issues with mylvmbackup:
- The minimal privileges required to take MySQL backups with mylvmbackup.
- Making (non compressed) file system copy of one’s data files.
Minimal privileges
Some just give mylvmbackup the root account, which is far too permissive. We now consider what the minimal requirements of mylvmbackup are.
The queries mylvmbackup issues are:
- FLUSH TABLES
- FLUSH TABLES WITH READ LOCK
- SHOW MASTER STATUS
- SHOW SLAVE STATUS
- UNLOCK TABLES
Both SHOW MASTER STATUS & SHOW SLAVE STATUS require either the SUPER or REPLICATION CLIENT privilege. Since SUPER is more powerful, we choose REPLICATION CLIENT.
The FLUSH TABLES * and UNLOCK TABLES require the RELOAD privilege.
However, we are not done yet. mylvmbackup connects to the mysql database, which means we must also have some privilege there, too. We choose the SELECT privilege.
Continue reading » “mylvmbackup HOWTO: minimal privileges & filesystem copy”