ERROR 1682 (HY000)

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             |
+-----------------------------------------------+-----------------

转载于:https://www.cnblogs.com/2woods/p/9470856.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值