Href: http://www.drlock.com/blog/2006/12/22/mysqldump-permissions/
I wanted to create a user who had just enough permissions to make a SQL dump of my database for backup purposes. I hunted all over the ‘net, but no one told what permissions were needed so by trial and error I found out:
GRANT SELECT, LOCK TABLES ON *.* TO backup_user@localhost IDENTIFIED BY ‘xxx’;
Now I can have a script that runs with my backup tools that executes:
mysqldump –user backup –password=xxx –all-databases –compact | gzip -9 > db_backup.sql.gz
No comments:
Post a Comment