MySQL Forums
Forum List  »  Backup

LOCK TABL errors with mysqldump (explicit socket file)
Posted by: Tim Johnson
Date: November 05, 2012 06:15PM

Using mysql 5.5.21 on Mac OSX 10.7
I'm attempting to backup a drupal database using mysqldump.
In my case drupal uses a separate datadir, socket file and option file,
and it's own mysql listening on port 3307.
I can access the drupal database from the command line using
mysql -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock
However, when I attempt to dump the drupal databases, I get errors. The
following console session attempts to dump each database separately :
linus:prj tim$ mysqldump -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock test >drupal-test.sql
linus:prj tim$ mysqldump -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock information_schema >drupal-information_schema.sql
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
linus:prj tim$ mysqldump -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock bitnami_drupal7 >drupal-bitnami_drupal7.sql
linus:prj tim$ mysqldump -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock mysql >drupal-mysql.sql
linus:prj tim$ mysqldump -hlocalhost -uroot -psecret -P3307 -S/Applications/drupal-7.15-0/mysql/tmp/mysql.sock performance_schema >drupal-performance_schema.sql
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES
So, I don't understand the error messages. What do I need to do to
effect this dump successfully?
thanks
tim

Options: ReplyQuote


Subject
Views
Written By
Posted
LOCK TABL errors with mysqldump (explicit socket file)
3367
November 05, 2012 06:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.