#40 Access denied for user to database 'information_schema'

v2.5
closed-fixed
nobody
None
5
2011-08-14
2011-07-05
Javier Novoa
No

When using the 'all' value in the DBNAMES option, automysqlbackup will try to backup the 'information_schema' database.

This gives an
Access denied for user 'user'@'host' to database 'information_schema' when using LOCK TABLES
error
and an
SELECT,LOCK TABL command denied to user 'user'@'host' for table 'cond_instances' when using LOCK TABLES
error

Even using a superuser (all privileges) account!

Looking at mysqldump man page, I've found that adding a --skip-lock-tables option in the OPT string solves the problem.
But I guess this is not a correct solution, since locking tables might be good for other tables.

I suggest adding this option just for information_schema DB or not backing up information_schema when using the 'all' DBNAMES option...

Discussion

  • Javier Novoa
    Javier Novoa
    2011-07-13

    Thank you @modir ! that worked just fine :)

    do you know if there is some plan to release an upgrade of the code with this kind of corrections in it?

     
  • Javier Novoa
    Javier Novoa
    2011-07-13

    • status: open --> closed
     
  • PittaGurneyi
    PittaGurneyi
    2011-08-14

    • status: closed --> closed-fixed
     
  • Kenji
    Kenji
    2012-04-25

    I added --single-transaction option.

    - opt=( '--quote-names' '--opt' )
    + opt=( '--quote-names' '--opt' '--single-transaction' )