Bug #18615 mysqlhotcopy privileges should mention lock privilege
Submitted: 29 Mar 2006 14:15 Modified: 5 Apr 2006 19:37
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:* OS:Any (*)
Assigned to: Paul DuBois CPU Architecture:Any

[29 Mar 2006 14:15] Olaf van der Spek
Description:
Hi,

http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html

> It uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a database backup quickly.
> To execute mysqlhotcopy, you must have access to the files for the tables that you are backing up, the SELECT privilege for those tables, and the RELOAD privilege (to be able to execute FLUSH TABLES). 

I think you also need to have the LOCK privilege

How to repeat:
-
[29 Mar 2006 15:30] Valeriy Kravchuk
Thank you for a problem report. Yes, it seems obvious that LOCK TABLES priviledge is also needed and, thus, documentation should be fixed. Do you have a small test case that proves that?
[31 Mar 2006 21:46] Olaf van der Spek
$ mysqlhotcopy -u aaa -p=aaa test ./test_copy
DBD::mysql::db do failed: Access denied for user 'aaa'@'%' to database 'test' at
/usr/bin/mysqlhotcopy line 470.
$

470      $dbh->do("LOCK TABLES $hc_locks");
[2 Apr 2006 7:39] Valeriy Kravchuk
Verified just as described :) Documentation should be corrected.
[5 Apr 2006 19:37] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).