Posted on 2012-05-11 14:01
Milo的海域 閱讀(1110)
評論(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