I've downloaded the 'AutoMySQLBackup' script from Source Forge
My question is in the configuration file for the script, it just runs as root and I need to statically throw the root password into the script so it can extract the dump files from the DBMS. Can someone please tell me if I can and should create a new user / role in MySQL who's main function is to just backup the entire database for disaster recover? Can someone tell me how I should do this and what grants this user will require?
I have looked through the script and it is using mysqldump to take the backups. If there are specific databases you want to backup then you could create a new user granted all privileges in the database in question in order to run the backup:
GRANT ALL PRIVILEGES ON dbname.* TO user@localhost;
It then means that you could use that particular user to run the backups from. However, it should be noted that having all privileges is the same as an administrators privileges on that particular database and they could easily drop, create, update tables as well as view, add, delete or modify the data within the tables.
In the above example, it is important to note the user@localhost. This will only give these privileges if you are logging in from this machine which stops anyone taking the username and the password and attempting to access remotely.
So I guess there's no real yes or no but more of personal preference for having a backup user role for MySQL, right? I don't see anything in docs or online. Just trying to follow correct protocol. What do you guys suggest? I just do it as a regular user who has those mentioned above privileges only or those privileges + more?