[iyunv@localhost ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.5.35-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> create database cloudTest;
mysql> user cloudTest;
mysql> set session sql_log_bin = 0
mysql> source /tmp/cloudTest.sql;
......(执行时长25分钟左右)
ERROR 1231 (42000): Variable 'time_zone' can't be set to the value of 'NULL'
ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'
ERROR 1231 (42000): Variable 'foreign_key_checks' can't be set to the value of 'NULL'
ERROR 1231 (42000): Variable 'unique_checks' can't be set to the value of 'NULL'
ERROR 1231 (42000): Variable 'character_set_client' can't be set to the value of 'NULL'
Query OK, 0 rows affected (0.00 sec)
ERROR 1231 (42000): Variable 'collation_connection' can't be set to the value of 'NULL'
ERROR 1231 (42000): Variable 'sql_notes' can't be set to the value of 'NULL'
解决办法:
1
2
3
4
5
6
7
[iyunv@localhost ~]# vim /etc/my.cnf
[mysqld]
max_allowed_packet = 500M
[mysqldump]
quick
max_allowed_packet = 500M
1
[iyunv@localhost ~]# service mysqld restart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
再次执行恢复现场操作
[iyunv@localhost ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.5.35-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> create database cloudTest;
mysql> user cloudTest;
mysql> set session sql_log_bin = 0
mysql> source /tmp/cloudTest.sql;
[iyunv@localhost script]# mysqldump -uroot -p performance_schema > /tmp/performance_schema.sql
Enter password:
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES