Search code examples
mysqldatabaseprivileges

which mysql Privileges should I be using for these users?


I am creating two users, one is only for mysqldump to backup my database, another one is to check mysql connection and galera cluster status.

I read the privileges and set my backup user to have the privileges of lock tables by following this post http://bencane.com/2011/12/12/creating-a-read-only-backup-user-for-mysqldump/

as for to check my connections and cluster status, I gave the user privileges of usage

Are these two privileges the best for what I want to do too? or I should give me other privileges?

Thanks for any advices


Solution

  • Privileges required for mysqldump are answered in this previous Stack Overflow post: Minimum GRANTs needed by mysqldump for dumping a full schema? (TRIGGERs are missing!!)

    Since you said you're using Galera Cluster, you might also need to do an SST from time to time using Percona XtraBackup. The privileges required by XtraBackup are different. See https://www.percona.com/doc/percona-xtrabackup/LATEST/innobackupex/privileges.html