在写一个脚本,备份表数据,当表有数据在插入的时候,提示
Access denied for user '**'@'**' to database '**' when doing LOCK TABLES
搜了一下原因:
Lock all tables before dumping them. The tables are locked with READ LOCAL to allow concurrent inserts in the case of MyISAM tables. For transactional tables such as InnoDB and BDB, --single-transaction is a much better option, because it does not need to lock the tables at all.