MySQL5.1 information_schema error
When you have been upgrading MySQL to 5.1 you might suddenly get some mysqldump errors
Like:
mysqldump: Got error: 1044: Access denied for user ‘admin’@’localhost’ to database ‘information_schema’ when using LOCK TABLES
(Note: here we have the user ‘admin’,because it is used on Plesk servers, normally it is user ‘root’)
Nothing to panic; there is more then one solution to this:
You should remove ‘–lock-tables’ from your mysqldump command AND add ‘–single-transaction’ to your mysqldump command.
Or alternatively you can GRANT user ‘admin’ rights to LOCK TABLES:
mysql -u admin -p`cat /etc/psa/.psa.shadow` mysql> GRANT SELECT,LOCK TABLES ON information_schema.* TO 'admin'@'localhost'; mysql> quit