[Root@slave2 bak]# mysql-u root-p < 20161206112352.sql
Warning:using a password on the command line interface can is insecure.
ERROR 1142 (42000) at line 6688:select, LOCK TABLES command denied to user ' root ' @ ' localhost ' for table ' accounts '
Mysql> Select Table_schema,table_name from information_schema.tables where table_name= ' accounts ';
+--------------------+------------+
| Table_schema | table_name |
+--------------------+------------+
| Performance_schema | accounts |
+--------------------+------------+
1 row in Set (0.11 sec)
and view the backup file, and you do have a backup statement that backs up the table:
Use ' Performance_schema ';
--
--Table structure for table ' accounts '
--
DROP TABLE IF EXISTS ' accounts ';
/*!40101 SET @saved_cs_client = @ @character_set_client * *;
/*!40101 SET character_set_client = UTF8 * *;
CREATE TABLE ' accounts ' (
' USER ' char CHARACTER SET UTF8 COLLATE utf8_bin DEFAULT NULL,
' HOST ' char CHARACTER SET UTF8 COLLATE utf8_bin DEFAULT NULL,
' Current_connections ' bigint not NULL,
' Total_connections ' bigint not NULL
) Engine=performance_schema DEFAULT Charset=utf8;
/*!40101 SET character_set_client = @saved_cs_client * *;
......
--I don't know why I backed up on two machines with 5.6.33 installed, one of which automatically backs up the library Performance_schema, and the other machine doesn't. Strange. Some say it is unreasonable to upgrade the MySQL version caused. I don't know.
Due to import data times error 1142 (42000) at line 6688:select, LOCK TABLES command denied to user ' root ' @ ' localhost ' for table ' account S ',
Therefore, the performance_schema.accounts data in the backup file cannot be returned.
You can comment out or delete a backup statement about Performance_schema, and then restore it.
You can also explicitly not back up your system's own libraries in this way:
Mysql-uroot-p-e ' show databases; ' | Grep-e-V "database|information_schema|mysql|test|performance_schema" |xargs mysqldump-uroot-p--databases > All.bak