Posted on 2012-05-11 14:01 
Milo的海域 阅读(1134) 
评论(1)  编辑  收藏  所属分类: 
MySQL 
			 
			
		 
		MySQL 5.5多出了两个新数据库
 information_schema &
 performance_schema
 mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| mysql              | 
| performance_schema | 
| test               | 
+--------------------+    
 
但是用mysqldump去备份这两个数据库的时候都会报错
 mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES
  
用--all-databases备份时也不会备份这两个数据库
官方文档里解释到:
http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html
总结一下,如果一定要用mysqldump去备份这两个数据库不是不可以,但是得disable lock tables。 我用的是:
--database information_schema --lock-tables=0