# uname -a;cat /etc/redhat-release Linux prbc01.mg.local 2.6.32-279.19.1.el6.centos.plus.x86_64 #1 SMP Wed Dec 19 06:20:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Red Hat Enterprise Linux Server release 6.3 (Santiago)
mysqldump: Got error: 1045: Access denied for user 'yyy'@'zzz' (using password: YES) when using LOCK TABLES
So I thinke that mysqldump locks the table (--add-locks) by default.
But for this user:
mysql> show grants for yyy@'zzz'; +------------------------------------------------------------------------------------------------------------------------------------------------+ | Grants for backup@localhost
| +------------------------------------------------------------------------------------------------------------------------------------------------+ | GRANT SELECT, RELOAD, LOCK TABLES, SHOW VIEW ON *.* TO 'yyy'@'zzz' IDENTIFIED BY PASSWORD ... | | +------------------------------------------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)
So why is this error showing? When I add --single-transaction to mysqldump everything is ok. But I would like to have this table locked because:
mysql> SELECT ENGINE -> FROM information_schema.TABLES -> WHERE TABLE_SCHEMA = 'information_schema' -> AND TABLE_NAME = 'routines'; +--------+ | ENGINE | +--------+ | MyISAM | +--------+
so information_schema.tables is myisam.
So why do I get the error about LOCK TABLES?
Best regards, Rafal Radecki.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Feb 04
Rick James RE: Mysqldump routines dump, problem with lock tables.
Feb 04, 2013; 21:07
Rick James
RE: Mysqldump routines dump, problem with lock tables.
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!