ERROR 1682 (HY000)
xtrabackup 恢复数据库后,出现1682错:
root@localhost [(none)]>show global variables like '%conn%';
ERROR 1682 (HY000): Native table 'performance_schema'.'global_variables' has the wrong structure
解决办法:
[root@db210_21:51:17 /root]
#/usr/local/mysql57/bin/mysql_upgrade -S /3101/tmp/mysql.sock
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.server_cost OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
The sys schema is already up to date (version 1.5.1).
Checking databases.
sys.sys_config OK
sysbench.sbtest1 OK
sysbench.sbtest10 OK
sysbench.sbtest11 OK
sysbench.sbtest12 OK
sysbench.sbtest13 OK
sysbench.sbtest14 OK
sysbench.sbtest15 OK
sysbench.sbtest16 OK
sysbench.sbtest17 OK
sysbench.sbtest18 OK
sysbench.sbtest19 OK
sysbench.sbtest2 OK
sysbench.sbtest20 OK
sysbench.sbtest3 OK
sysbench.sbtest4 OK
sysbench.sbtest5 OK
sysbench.sbtest6 OK
sysbench.sbtest7 OK
sysbench.sbtest8 OK
sysbench.sbtest9 OK
wenyz.t2 OK
Upgrade process completed successfully.
Checking if update is needed.
重启mysql后恢复正常
root@localhost [(none)]>show global variables like '%conn%';
+-----------------------------------------------+-----------------+
| Variable_name | Value |
+-----------------------------------------------+-----------------+
| character_set_connection | utf8 |
| collation_connection | utf8_general_ci |
| connect_timeout | 10 |
| disconnect_on_expired_password | ON |
| init_connect | |
| max_connect_errors | 100000 |
| max_connections | 100 |
| max_user_connections | 0 |
| performance_schema_session_connect_attrs_size | 512 |
+-----------------------------------------------+-----------------