zoukankan      html  css  js  c++  java
  • 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             |
    +-----------------------------------------------+-----------------
    
  • 相关阅读:
    Redis之使用python脚本监控队列长度
    ELK之filebate收集日志传递至Logstash
    [转] SOLID五大设计原则
    [转] 面向对象原则之GOF是招式,九大原则才是精髓
    [转] (CQRS)命令和查询责任分离架构模式(一) 之 什么是CQRS
    [0] 四色原型
    [0] C#软件项目版本号的命名规则及格式介绍
    [0] AssemblyInfo.cs文件介绍
    [0] 服务器 TCP 提供程序无法在 [ 'any' <ipv4> *] 上侦听。TCP 端口已在使用中。
    [0] C#异常种类
  • 原文地址:https://www.cnblogs.com/2woods/p/9470856.html
Copyright © 2011-2022 走看看