Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1

    Question Unanswered: Role For Backing Up MySQL?

    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?

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    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.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  3. #3
    Join Date
    May 2008
    Posts
    17
    I think you only need SELECT and LOCK privileges on the database rather than ALL privileges.

  4. #4
    Join Date
    Oct 2010
    Location
    Orlando, FL
    Posts
    311
    Provided Answers: 1
    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •