I want to create mysql user with limited privileges to use only with mysqldump. What are minimum privileges that we can assign to user so he can just take dump and load databases or this requires admin rights ?
For now I have something like this working but I am not certain about the scope:
DROP user 'dumpuser'@'localhost' ;
FLUSH PRIVILEGES ;
GRANT SELECT ON mysql.proc TO 'dumpuser'@'localhost' IDENTIFIED BY 'dumppwd';
GRANT ALL ON dbname.* TO 'dumpuser'@'localhost' IDENTIFIED BY 'dumppwd';
FLUSH PRIVILEGES;
I want to further limit privilege scope if possible.
mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, and LOCK TABLES if the --single-transaction option is not used. Certain options might require other privileges as noted in the option descriptions.
From http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With