mysqlperconamysql-backup

MySQL Permission for performing backup


What are the minimum required permissions for a mysql user to perform a backup using mysqldump/xtrabackup? I do not want permissions to power like root, but just enough to perform a backup. This is becasue innobackupex requires you to add the password on command line, which is not too secure. So i would like to create another user with not so much privileges to be used.


Solution

  • On MySQL this would be these permissions as far as I know:

    GRANT SELECT, LOCK TABLES, RELOAD, SHOW VIEW ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';
    

    Note that it may vary if you use views, functions, procedures etc